import React from 'react'; import { List, ListItem, ListItemText, ListItemIcon } from '@material-ui/core'; import { Link, useLocation } from 'react-router-dom'; const ReportSidebar = ({ routes }) => { const location = useLocation(); return ( {routes.map((route, index) => ( {route.icon} ))} ) } export default ReportSidebar;