Added fix to searching for admin role
This commit is contained in:
1 parent
a10b831744
commit
e2b5ad2524
2 files changed
+4
-4
No files matched your search
@@ -51,9 +51,9 @@ function NavBar() {
|
||||
const authState = useSelector((state) => state.auth);
|
||||
|
||||
let settings = ["Profile", "Password", "Team", "Logout"];
|
||||
if (authState.user.role[0] !== "admin")
|
||||
if (!authState.user.role.includes("admin"))
|
||||
settings = ["Profile", "Password", "Logout"];
|
||||
|
||||
|
||||
/**
|
||||
* Handles opening the user menu.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user