| | |
| | | import SubMenu from './SubMenu'; |
| | | import SettingsIcon from '@mui/icons-material/Settings'; |
| | | import DashboardIcon from '@mui/icons-material/Dashboard'; |
| | | import DehazeIcon from '@mui/icons-material/Dehaze'; |
| | | import HorizontalRuleIcon from '@mui/icons-material/HorizontalRule'; |
| | | import PersonIcon from '@mui/icons-material/Person'; |
| | | import * as Icons from '@mui/icons-material'; |
| | | |
| | | const getIconComponent = (iconStr) => { |
| | | return Icons[iconStr] || DehazeIcon; |
| | | return Icons[iconStr] || HorizontalRuleIcon; |
| | | }; |
| | | |
| | | export const MyMenu = ({ dense = false }) => { |
| | |
| | | |
| | | const getIcon = (iconStr) => { |
| | | const IconComponent = getIconComponent(iconStr); |
| | | return <IconComponent />; |
| | | if (IconComponent) { |
| | | return <IconComponent />; |
| | | } |
| | | }; |
| | | |
| | | const generateMenu = (permissions) => { |