From 635445f23bb722981271a0cd1fe4e17efc48e191 Mon Sep 17 00:00:00 2001 From: asiaznik Date: Thu, 7 Mar 2024 12:18:47 +0100 Subject: [PATCH] chore: clear timeout --- apps/trading/components/bootstrapper/bootstrapper.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/trading/components/bootstrapper/bootstrapper.tsx b/apps/trading/components/bootstrapper/bootstrapper.tsx index 23fa62899..9d7136753 100644 --- a/apps/trading/components/bootstrapper/bootstrapper.tsx +++ b/apps/trading/components/bootstrapper/bootstrapper.tsx @@ -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 (