fix(authContext.tsx): fix condition in logout function to check for autoLogin instead of isAuthenticated to prevent unnecessary logout

This commit is contained in:
cristhianzl 2024-01-11 10:03:07 -03:00
commit 76a0f5162c

View file

@ -104,7 +104,7 @@ export function AuthProvider({ children }): React.ReactElement {
} }
async function logout() { async function logout() {
if (!isAuthenticated) { if (autoLogin) {
return; return;
} }
try { try {