mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-01 15:46:40 +07:00
completely removed flow-related sagas
This commit is contained in:
parent
5f3accee48
commit
38eedab3c2
26 changed files with 326 additions and 310 deletions
16
src/hooks/dom/useGlobalLoader.ts
Normal file
16
src/hooks/dom/useGlobalLoader.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { useEffect } from 'react';
|
||||
import { useFlowStore } from '~/store/flow/useFlowStore';
|
||||
import { hideLoader } from '~/utils/dom/hideLoader';
|
||||
|
||||
/** simply waits for all data to settle and then show the app */
|
||||
export const useGlobalLoader = () => {
|
||||
const flow = useFlowStore();
|
||||
|
||||
useEffect(() => {
|
||||
if (!flow.isRefreshed) {
|
||||
return;
|
||||
}
|
||||
|
||||
hideLoader();
|
||||
}, [flow.isRefreshed]);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue