usepublish fix

This commit is contained in:
PhilReact 2025-05-04 20:32:05 +03:00
parent f0c1b956ac
commit 0fbfc8a327
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "qapp-core",
"version": "1.0.24",
"version": "1.0.25",
"description": "Qortal's core React library with global state, UI components, and utilities",
"main": "dist/index.js",
"module": "dist/index.mjs",

View File

@ -174,13 +174,13 @@ export const usePublish = (
[metadata]
);
useEffect(() => {
if (hasFetched.current) return;
if (metadata?.identifier && metadata?.name && metadata?.service) {
hasFetched.current = true;
fetchPublish(metadata);
}
}, [metadata, returnType]);
}, [metadata?.identifier, metadata?.service, metadata?.identifier, returnType]);
const refetchData = useCallback(async ()=> {
if(!metadata) throw new Error('usePublish is missing metadata')