Hide team panel for users
This commit is contained in:
1 parent
be10a16a73
commit
a10b831744
2 files changed
+10
-4
No files matched your search
@@ -25,7 +25,6 @@ import LogoutSvg from "../../assets/icons/logout.svg?react";
|
||||
|
||||
import BWULogo from "../../assets/Images/bwl-logo.svg?react";
|
||||
|
||||
const settings = ["Profile", "Password", "Team", "Logout"];
|
||||
const icons = {
|
||||
Profile: <UserSvg />,
|
||||
Team: <TeamSvg />,
|
||||
@@ -51,6 +50,10 @@ function NavBar() {
|
||||
const navigate = useNavigate();
|
||||
const authState = useSelector((state) => state.auth);
|
||||
|
||||
let settings = ["Profile", "Password", "Team", "Logout"];
|
||||
if (authState.user.role[0] !== "admin")
|
||||
settings = ["Profile", "Password", "Logout"];
|
||||
|
||||
/**
|
||||
* Handles opening the user menu.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user