loader hangs
This commit is contained in:
parent
68314e9d49
commit
1f4768bdcb
10
src/App.tsx
10
src/App.tsx
@ -34,6 +34,16 @@ export function App() {
|
|||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const users = useAppSelector(state => state.family.users);
|
const users = useAppSelector(state => state.family.users);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (showLoader) {
|
||||||
|
let timeout = setTimeout(() => { setShowLoader(false); }, 10_000);
|
||||||
|
return () => {
|
||||||
|
if (timeout) {
|
||||||
|
clearTimeout(timeout);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [showLoader, setShowLoader]);
|
||||||
|
|
||||||
const loadInitialState = async () => {
|
const loadInitialState = async () => {
|
||||||
setShowLoader(true);
|
setShowLoader(true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user