chore: clear timeout

This commit is contained in:
asiaznik 2024-03-07 12:18:47 +01:00
parent 10e30b9f70
commit 635445f23b
No known key found for this signature in database
GPG Key ID: 4D5C8972A02C52C2

View File

@ -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>