diff --git a/src/app/modules/auth/core/Auth.tsx b/src/app/modules/auth/core/Auth.tsx index 1c2f052..930131c 100644 --- a/src/app/modules/auth/core/Auth.tsx +++ b/src/app/modules/auth/core/Auth.tsx @@ -69,15 +69,18 @@ const AuthInit: FC = ({children}) => { const requestUser = async (apiToken: string) => { try { if (!didRequest.current) { - const {data} = await getUserByToken(apiToken) - if (data) { - setCurrentUser(data) + // const {data} = await getUserByToken(apiToken) + // if (data) { + // setCurrentUser(data) + // } + if(localStorage.getItem('kt-auth-react-v')){ + setCurrentUser(auth?.profile) } } } catch (error) { console.error(error) if (!didRequest.current) { - // logout() + logout() } } finally { setShowSplashScreen(false)