mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-04 12:01:52 +02:00
Fix error handling
This commit is contained in:
@@ -18,7 +18,7 @@ export function useLicense() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
listen('license-activated', () => {
|
listen('license-activated', () => {
|
||||||
queryClient.invalidateQueries({ queryKey: CHECK_QUERY_KEY }).catch(console.error);
|
queryClient.invalidateQueries({ queryKey: CHECK_QUERY_KEY }).catch(console.error);
|
||||||
}).then(console.error);
|
}).catch(console.error);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const CHECK_QUERY_KEY = ['license.check'];
|
const CHECK_QUERY_KEY = ['license.check'];
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ import { keyValuesAtom } from './useKeyValue';
|
|||||||
|
|
||||||
export function useSyncWorkspaceChildModels() {
|
export function useSyncWorkspaceChildModels() {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
jotaiStore.sub(activeWorkspaceIdAtom, sync);
|
const unsub = jotaiStore.sub(activeWorkspaceIdAtom, sync);
|
||||||
sync().catch(console.error);
|
sync().catch(console.error);
|
||||||
|
return unsub;
|
||||||
}, []);
|
}, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user