chore: clear timeout

This commit is contained in:
asiaznik
2024-03-08 13:53:57 +01:00
parent 10e30b9f70
commit 635445f23b
@@ -42,9 +42,12 @@ const Loading = () => {
const t = useT();
const setNodeSwitcher = useNodeSwitcherStore((store) => store.setDialogOpen);
useEffect(() => {
setTimeout(() => {
const to = setTimeout(() => {
if (!showSlowNotification) setShowSlowNotification(true);
}, 5000);
return () => {
clearTimeout(to);
};
}, [showSlowNotification]);
return (
<Splash>