loader hangs
This commit is contained in:
+10
@@ -34,6 +34,16 @@ export function App() {
|
||||
const dispatch = useAppDispatch();
|
||||
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 () => {
|
||||
setShowLoader(true);
|
||||
|
||||
Reference in New Issue
Block a user