import React, { Fragment } from 'react'; import { List, ListItem, ListItemText, ListItemIcon, Divider, ListSubheader, } from '@mui/material'; import { Link, useLocation } from 'react-router-dom'; const SideNav = ({ routes }) => { const location = useLocation(); return ( {routes.map((route) => (route.subheader ? ( {route.subheader} ) : ( {route.icon} )))} ); }; export default SideNav;