From 70a8b1f630470bc5ebe8e9e90b54a9824422705e Mon Sep 17 00:00:00 2001 From: igorrCarvalho Date: Mon, 28 Aug 2023 17:28:32 -0300 Subject: [PATCH] Fix: Admin Page button showing even when logged as normal user --- src/frontend/src/contexts/authContext.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/src/contexts/authContext.tsx b/src/frontend/src/contexts/authContext.tsx index c1c06d1eb..d1054cb28 100644 --- a/src/frontend/src/contexts/authContext.tsx +++ b/src/frontend/src/contexts/authContext.tsx @@ -92,6 +92,7 @@ export function AuthProvider({ children }): React.ReactElement { function logout() { cookies.remove("access_token", { path: "/" }); cookies.remove("refresh_token", { path: "/" }); + setIsAdmin(false); setUserData(null); setAccessToken(null); setRefreshToken(null);