diff --git a/src/App.tsx b/src/App.tsx index 956666c..7342d81 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -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);