1
0
Fork 0
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:
Fedor Katurov 2022-10-17 11:19:18 +06:00
parent 2160f50711
commit 0dfc334274

View file

@ -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]);
}; };