import { ReactElement } from 'react' import { Link, RouteComponentProps } from 'react-router-dom' import { createStyles, Theme, makeStyles } from '@material-ui/core/styles' import { ListItemText, ListItemIcon, ListItem, Divider, List, Drawer, Link as MUILink } from '@material-ui/core' import { OpenInNewSharp } from '@material-ui/icons' import { Activity, FileText, DollarSign, Share2, Settings, Layers } from 'react-feather' import SwarmLogoOrange from '../assets/swarm-logo-orange.svg' import { Health } from '@ethersphere/bee-js' const drawerWidth = 240 const navBarItems = [ { label: 'Status', id: 'status', path: '/', icon: Activity, }, { label: 'Files', id: 'files', path: '/files/', icon: FileText, }, { label: 'Stamps', id: 'stamps', path: '/stamps/', icon: Layers, }, { label: 'Accounting', id: 'accounting', path: '/accounting/', icon: DollarSign, }, { label: 'Peers', id: 'peers', path: '/peers/', icon: Share2, }, { label: 'Settings', id: 'settings', path: '/settings/', icon: Settings, }, ] const useStyles = makeStyles((theme: Theme) => createStyles({ root: { display: 'flex', }, appBar: { width: `calc(100% - ${drawerWidth}px)`, marginLeft: drawerWidth, }, logo: { padding: 1, marginTop: 20, }, drawer: { width: drawerWidth, flexShrink: 0, }, drawerPaper: { width: drawerWidth, }, activeSideBar: { color: '#dd7700', }, activeSideBarItem: { borderLeft: '4px solid #dd7700', backgroundColor: 'inherit !important', }, toolbar: theme.mixins.toolbar, }), ) interface Props extends RouteComponentProps { themeMode: string health: boolean nodeHealth: Health | null } export default function SideBar(props: Props): ReactElement { const classes = useStyles() return (