Fix cid not passed to the callback function
This commit is contained in:
parent
fc9345693f
commit
0c2faf02be
|
@ -5,7 +5,7 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/codex-storage/codex-marketplace-ui-components"
|
"url": "https://github.com/codex-storage/codex-marketplace-ui-components"
|
||||||
},
|
},
|
||||||
"version": "0.0.12",
|
"version": "0.0.13",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepack": "npm run build",
|
"prepack": "npm run build",
|
||||||
|
|
|
@ -154,10 +154,10 @@ export function UploadFile({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch({ type: "completed", cid: state.cid });
|
dispatch({ type: "completed", cid: res.data });
|
||||||
|
|
||||||
onSuccess?.(state.cid, file);
|
onSuccess?.(res.data, file);
|
||||||
}, [state.cid, codexData, onSuccess, file]);
|
}, [codexData, onSuccess, file]);
|
||||||
|
|
||||||
const init = useRef(false);
|
const init = useRef(false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue