import React, { Fragment } from 'react'; import { List, ListItemText, ListItemIcon, Divider, ListSubheader, ListItemButton, } 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;