fix(authContext.tsx): fix condition in logout function to check for autoLogin instead of isAuthenticated to prevent unnecessary logout
This commit is contained in:
parent
c54c080629
commit
60445d3af0
1 changed files with 1 additions and 1 deletions
|
|
@ -104,7 +104,7 @@ export function AuthProvider({ children }): React.ReactElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
if (!isAuthenticated) {
|
if (autoLogin) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue