Fix cid not passed to the callback function
This commit is contained in:
parent
fc9345693f
commit
0c2faf02be
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue