From 617dbe4e5e776e98225d367097ac2921477812c4 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Wed, 11 Sep 2024 11:28:23 +0200 Subject: [PATCH] ui: spot improvs --- frontend/app/Router.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/app/Router.tsx b/frontend/app/Router.tsx index 48e69c77f..74ed041db 100644 --- a/frontend/app/Router.tsx +++ b/frontend/app/Router.tsx @@ -166,10 +166,10 @@ const Router: React.FC = (props) => { }, [scopeSetup]) useEffect(() => { - if (isLoggedIn && location.pathname.includes('login') && localSpotJwt) { - if (!isTokenExpired(localSpotJwt)) { + if (isLoggedIn && (location.pathname.includes('login') || isSpotCb)) { + if (localSpotJwt && !isTokenExpired(localSpotJwt)) { handleSpotLogin(localSpotJwt); - } else if (isSpotCb) { + } else { logout(); } }