From d5cf52672522876cf4fe2ffd0ca37f997992a010 Mon Sep 17 00:00:00 2001 From: Andrei Dekterev Date: Thu, 13 Apr 2023 21:18:54 +0700 Subject: [PATCH] fix(black screen): timeout logout --- src/features/AuthStore/hooks/useAuth.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/features/AuthStore/hooks/useAuth.tsx b/src/features/AuthStore/hooks/useAuth.tsx index b2d18ce0..66ccfc5d 100644 --- a/src/features/AuthStore/hooks/useAuth.tsx +++ b/src/features/AuthStore/hooks/useAuth.tsx @@ -278,7 +278,7 @@ export const useAuth = () => { setUserInfo(userInfoFetched) - if (includes(window.location.pathname, PAGES.landing)) { + if (includes(window.location.pathname, PAGES.landing && readToken())) { changeLang(navigator.language.substring(0, 2)) } else { userInfoFetched.language.iso && changeLang(userInfoFetched.language.iso) -- 2.30.2