Sfoglia il codice sorgente

changed navigation

FE_dev
Dzenis Hadzifejzovic 3 anni fa
parent
commit
cab23aaae6
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5
    1
      src/components/MUI/NavbarComponent.js

+ 5
- 1
src/components/MUI/NavbarComponent.js Vedi File

setPreview(!preview); setPreview(!preview);
}; };


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

useEffect(() => { useEffect(() => {
let handler = (e) => { let handler = (e) => {
if (userRef.current) { if (userRef.current) {
}} }}
className="navLinks-cont" className="navLinks-cont"
> >
{navItems.map((n) => (
{filterNavItems().map((n) => (
<Typography <Typography
variant="body1" variant="body1"
key={n} key={n}

Loading…
Annulla
Salva