mirror of
https://github.com/Qortal/qapp-core.git
synced 2025-06-14 17:41:20 +00:00
usepublish fix
This commit is contained in:
parent
f0c1b956ac
commit
0fbfc8a327
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "qapp-core",
|
"name": "qapp-core",
|
||||||
"version": "1.0.24",
|
"version": "1.0.25",
|
||||||
"description": "Qortal's core React library with global state, UI components, and utilities",
|
"description": "Qortal's core React library with global state, UI components, and utilities",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"module": "dist/index.mjs",
|
"module": "dist/index.mjs",
|
||||||
|
@ -174,13 +174,13 @@ export const usePublish = (
|
|||||||
[metadata]
|
[metadata]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (hasFetched.current) return;
|
|
||||||
if (metadata?.identifier && metadata?.name && metadata?.service) {
|
if (metadata?.identifier && metadata?.name && metadata?.service) {
|
||||||
hasFetched.current = true;
|
|
||||||
fetchPublish(metadata);
|
fetchPublish(metadata);
|
||||||
}
|
}
|
||||||
}, [metadata, returnType]);
|
}, [metadata?.identifier, metadata?.service, metadata?.identifier, returnType]);
|
||||||
|
|
||||||
const refetchData = useCallback(async ()=> {
|
const refetchData = useCallback(async ()=> {
|
||||||
if(!metadata) throw new Error('usePublish is missing metadata')
|
if(!metadata) throw new Error('usePublish is missing metadata')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user