Fix cid not passed to the callback function

This commit is contained in:
Arnaud 2024-09-30 12:58:51 +02:00
parent fc9345693f
commit 0c2faf02be
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/codex-storage/codex-marketplace-ui-components"
},
"version": "0.0.12",
"version": "0.0.13",
"type": "module",
"scripts": {
"prepack": "npm run build",

View File

@ -154,10 +154,10 @@ export function UploadFile({
return;
}
dispatch({ type: "completed", cid: state.cid });
dispatch({ type: "completed", cid: res.data });
onSuccess?.(state.cid, file);
}, [state.cid, codexData, onSuccess, file]);
onSuccess?.(res.data, file);
}, [codexData, onSuccess, file]);
const init = useRef(false);