From e9c1d70ea1bdd65e1be887b403741defddb31652 Mon Sep 17 00:00:00 2001 From: Stephen Gordon Date: Thu, 11 Apr 2024 10:37:07 +0100 Subject: [PATCH] removed login animations and brought back success callback --- src/app/layout.tsx | 3 +++ src/app/login/page.tsx | 14 ++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2300b5a..edc32fe 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -175,6 +175,9 @@ export default function RootLayout({ { + router.push('/home'); + }} config={{ appearance: { theme: 'dark', diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index 38a7f9f..c610965 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -49,17 +49,15 @@ const Page = () => { }); }); */ useEffect(() => { - if (zeroDevReady && authenticated ) { + if (zeroDevReady && !authenticated ) { + console.log("authenticated", authenticated) // set user address + console.log("address", user?.wallet?.address) dispatch(setAddress(user?.wallet?.address as string)); // route home - setRouteHome(true); - setTimeout(() => { - router.push('/home'); - }, 700) - + } }, [authenticated, zeroDevReady]); @@ -68,7 +66,7 @@ const Page = () => { return ( <> - {!routeHome && ( + { home - )} + );