mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 17:08:13 +00:00
less misleading redircting message, more comments for continuous dev
This commit is contained in:
1 parent
2f6b19dbb7
commit
b93cbfa990
2 files changed
+8
-4
No files matched your search
@@ -68,9 +68,13 @@ export const AuthenticationProvider = ({children}:{children:ReactNode})=>{
|
||||
const logout = useCallback(()=>{
|
||||
const sessionToken = localStorage.getItem(STORAGE_KEYS.SESSION_TOKEN);
|
||||
if (sessionToken !== null){
|
||||
DestroySession(sessionToken).then((res)=>{
|
||||
//TODO: error handling maybe necessary
|
||||
});}
|
||||
console.log('destroying the session');
|
||||
DestroySession(sessionToken).then((res)=>{
|
||||
if (res) console.log('Logout Success'); // do nothing
|
||||
else console.log(res); //TODO: error handling maybe necessary
|
||||
})
|
||||
;}
|
||||
// regarldess, clear the state and useeffect will rid of the localstorage
|
||||
setLogoutState();
|
||||
},[]);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ const RedirectToLogin = ()=>{
|
||||
},[]);
|
||||
return (
|
||||
<div className="fixed w-full h-full flex flex-col justify-center items-center">
|
||||
<LoadingDots type="bricks" message="Failed, redirecting..."/>
|
||||
<LoadingDots type="bricks" message="Redirecting..."/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user