Procházet zdrojové kódy

changed navigation

FE_dev
Dzenis Hadzifejzovic před 2 roky
rodič
revize
cab23aaae6
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5
    1
      src/components/MUI/NavbarComponent.js

+ 5
- 1
src/components/MUI/NavbarComponent.js Zobrazit soubor

@@ -71,6 +71,10 @@ const NavbarComponent = () => {
setPreview(!preview);
};

const filterNavItems = () => {
return navItems.filter(n => ((n === "users" && user.role === "SuperAdmin") || n !== "users"))
}

useEffect(() => {
let handler = (e) => {
if (userRef.current) {
@@ -313,7 +317,7 @@ const NavbarComponent = () => {
}}
className="navLinks-cont"
>
{navItems.map((n) => (
{filterNavItems().map((n) => (
<Typography
variant="body1"
key={n}

Načítá se…
Zrušit
Uložit