import React, { Component } from 'react' import './NavbarComponent.css' import AccountBoxIcon from '@mui/icons-material/AccountBox'; import { style } from '@mui/system'; import Tippy from '@tippyjs/react'; import 'tippy.js/dist/tippy.css' import { Link } from 'react-router-dom'; import PersonIcon from '@mui/icons-material/Person'; import LogoutIcon from '@mui/icons-material/Logout'; import StarsIcon from '@mui/icons-material/Stars'; import UserContext from '../../context/UserContext'; import SupervisorAccountIcon from '@mui/icons-material/SupervisorAccount'; import PhoneIphoneIcon from '@mui/icons-material/PhoneIphone'; export class NavbarComponent extends Component { constructor(props) { super(props) this.state = { } } logOut = () => { localStorage.clear() window.location.href = "/" } render() { return (
{ localStorage.getItem('token') && this.context.role == 'SUPERADMIN' ? : <> } { localStorage.getItem('token') ? : <> } { localStorage.getItem('token') ? : <> } { localStorage.getItem('token') ? : }
) } } NavbarComponent.contextType = UserContext export default NavbarComponent