aboutsummaryrefslogtreecommitdiff
path: root/modern/src/components/SideNav.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/components/SideNav.js')
-rw-r--r--modern/src/components/SideNav.js42
1 files changed, 21 insertions, 21 deletions
diff --git a/modern/src/components/SideNav.js b/modern/src/components/SideNav.js
index 8bd43ac2..aa078084 100644
--- a/modern/src/components/SideNav.js
+++ b/modern/src/components/SideNav.js
@@ -1,5 +1,7 @@
import React from 'react';
-import { List, ListItem, ListItemText, ListItemIcon, Divider, ListSubheader } from '@material-ui/core';
+import {
+ List, ListItem, ListItemText, ListItemIcon, Divider, ListSubheader,
+} from '@material-ui/core';
import { Link, useLocation } from 'react-router-dom';
const SideNav = ({ routes }) => {
@@ -7,26 +9,24 @@ const SideNav = ({ routes }) => {
return (
<List disablePadding style={{ paddingTop: '16px' }}>
- {routes.map((route, index) =>
- route.subheader ? (
- <>
- <Divider />
- <ListSubheader>{route.subheader}</ListSubheader>
- </>
- ) : (
- <ListItem
- disableRipple
- component={Link}
- key={route.href || route.subheader}
- button
- to={route.href}
- selected={location.pathname.match(route.match || route.href)}
- >
- <ListItemIcon>{route.icon}</ListItemIcon>
- <ListItemText primary={route.name} />
- </ListItem>
- )
- )}
+ {routes.map((route, index) => (route.subheader ? (
+ <>
+ <Divider />
+ <ListSubheader>{route.subheader}</ListSubheader>
+ </>
+ ) : (
+ <ListItem
+ disableRipple
+ component={Link}
+ key={route.href || route.subheader}
+ button
+ to={route.href}
+ selected={location.pathname.match(route.match || route.href)}
+ >
+ <ListItemIcon>{route.icon}</ListItemIcon>
+ <ListItemText primary={route.name} />
+ </ListItem>
+ )))}
</List>
);
};