chore: clear timeout
This commit is contained in:
parent
10e30b9f70
commit
635445f23b
@ -42,9 +42,12 @@ const Loading = () => {
|
|||||||
const t = useT();
|
const t = useT();
|
||||||
const setNodeSwitcher = useNodeSwitcherStore((store) => store.setDialogOpen);
|
const setNodeSwitcher = useNodeSwitcherStore((store) => store.setDialogOpen);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTimeout(() => {
|
const to = setTimeout(() => {
|
||||||
if (!showSlowNotification) setShowSlowNotification(true);
|
if (!showSlowNotification) setShowSlowNotification(true);
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
return () => {
|
||||||
|
clearTimeout(to);
|
||||||
|
};
|
||||||
}, [showSlowNotification]);
|
}, [showSlowNotification]);
|
||||||
return (
|
return (
|
||||||
<Splash>
|
<Splash>
|
||||||
|
Loading…
Reference in New Issue
Block a user