diff options
author | Anton Tananaev <anton@traccar.org> | 2022-04-16 16:16:32 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-04-16 16:16:32 -0700 |
commit | 5cfa27b57d47bcffc69f14f05c98515f48224d8d (patch) | |
tree | 33cf439e2e306cf109e050d48ee409117206efe0 /modern/src | |
parent | 838e1b969162b73b1bbafab75203998e7bf60979 (diff) | |
download | trackermap-web-5cfa27b57d47bcffc69f14f05c98515f48224d8d.tar.gz trackermap-web-5cfa27b57d47bcffc69f14f05c98515f48224d8d.tar.bz2 trackermap-web-5cfa27b57d47bcffc69f14f05c98515f48224d8d.zip |
Fix side nav error
Diffstat (limited to 'modern/src')
-rw-r--r-- | modern/src/components/SideNav.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modern/src/components/SideNav.js b/modern/src/components/SideNav.js index 62c64fd2..ad7c212a 100644 --- a/modern/src/components/SideNav.js +++ b/modern/src/components/SideNav.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { Fragment } from 'react'; import { List, ListItem, ListItemText, ListItemIcon, Divider, ListSubheader, } from '@material-ui/core'; @@ -10,15 +10,15 @@ const SideNav = ({ routes }) => { return ( <List disablePadding style={{ paddingTop: '16px' }}> {routes.map((route) => (route.subheader ? ( - <> + <Fragment key={route.subheader}> <Divider /> <ListSubheader>{route.subheader}</ListSubheader> - </> + </Fragment> ) : ( <ListItem disableRipple component={Link} - key={route.href || route.subheader} + key={route.href} button to={route.href} selected={location.pathname.match(route.match || route.href) !== null} |