Hide team panel for users

This commit is contained in:
Daniel Cojocea committed 2024-07-24 14:46:49 -04:00
1 parent be10a16a73
commit a10b831744
2 files changed
+10 -4

No files matched your search

+4 -1
View File
@@ -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.
*