mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fixed flow reload on login
This commit is contained in:
parent
2160f50711
commit
0dfc334274
1 changed files with 9 additions and 1 deletions
|
@ -9,7 +9,11 @@ import { hideLoader } from '~/utils/dom/hideLoader';
|
||||||
/** simply waits for all data to settle and then show the app */
|
/** simply waits for all data to settle and then show the app */
|
||||||
export const useGlobalLoader = () => {
|
export const useGlobalLoader = () => {
|
||||||
const { getInitialNodes } = useFlowLoader();
|
const { getInitialNodes } = useFlowLoader();
|
||||||
const { loadMore: loadLabNodes, nodes: labNodes, isLoading: isLoadingLab } = useLab();
|
const {
|
||||||
|
loadMore: loadLabNodes,
|
||||||
|
nodes: labNodes,
|
||||||
|
isLoading: isLoadingLab,
|
||||||
|
} = useLab();
|
||||||
const { isUser } = useAuth();
|
const { isUser } = useAuth();
|
||||||
|
|
||||||
const flow = useFlowStore();
|
const flow = useFlowStore();
|
||||||
|
@ -26,4 +30,8 @@ export const useGlobalLoader = () => {
|
||||||
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
}, [flow.isRefreshed, getInitialNodes]);
|
}, [flow.isRefreshed, getInitialNodes]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
void getInitialNodes();
|
||||||
|
}, [isUser]);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue