Skip to content

Commit b83ba82

Browse files
committed
fix const cid problem
1 parent 5939905 commit b83ba82

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pages/edit.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@ export default function EditItem() {
5656
}, [])
5757

5858
useEffect(() => {
59-
async function fetchArticle() {
59+
async function fetchArticle(cid) {
6060
nft = await loadNFT(cid)
6161
if (nft && 'image' in nft) {
6262
setPreview(nft.image)
6363
setLoadingState("loaded")
6464
}
6565
}
6666
if ("cid" in router.query) {
67-
setCid(router.query.cid.toString())
68-
fetchArticle()
67+
setCid(router.query.cid.toString()) // TODO
68+
fetchArticle(router.query.cid.toString())
6969
}
7070
}, [router.query])
7171

0 commit comments

Comments
 (0)