Fix: Admin Page button showing even when logged as normal user
This commit is contained in:
parent
a154955154
commit
70a8b1f630
1 changed files with 1 additions and 0 deletions
|
|
@ -92,6 +92,7 @@ export function AuthProvider({ children }): React.ReactElement {
|
||||||
function logout() {
|
function logout() {
|
||||||
cookies.remove("access_token", { path: "/" });
|
cookies.remove("access_token", { path: "/" });
|
||||||
cookies.remove("refresh_token", { path: "/" });
|
cookies.remove("refresh_token", { path: "/" });
|
||||||
|
setIsAdmin(false);
|
||||||
setUserData(null);
|
setUserData(null);
|
||||||
setAccessToken(null);
|
setAccessToken(null);
|
||||||
setRefreshToken(null);
|
setRefreshToken(null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue