From d9c16ee979bf0a816002637238cc7a66405cf680 Mon Sep 17 00:00:00 2001 From: hide-on-bush-x Date: Sat, 4 Feb 2023 23:14:21 -0300 Subject: [PATCH] loading before redurect --- .../masa-interface/pages/connected/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/components/masa-interface/pages/connected/index.tsx b/src/common/components/masa-interface/pages/connected/index.tsx index b6a216e9..9345d656 100644 --- a/src/common/components/masa-interface/pages/connected/index.tsx +++ b/src/common/components/masa-interface/pages/connected/index.tsx @@ -7,10 +7,12 @@ export const InterfaceConnected = () => { const { company, loading, closeModal } = useMasa(); useEffect(() => { - setTimeout(() => { - closeModal?.(); - }, 3000); - }, []); + if (!loading) { + setTimeout(() => { + closeModal?.(); + }, 3000); + } + }, [loading]); if (loading) return ; return (