Merge pull request #459 from MichaelDvP/v2_cmd

menu item highlighting
This commit is contained in:
Proddy
2020-08-19 10:45:24 +02:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -16,13 +16,13 @@ class ProjectMenu extends Component<ProjectProps> {
const path = this.props.match.url;
return (
<List>
<ListItem to='/ems-esp/status/' selected={path.startsWith('/ems-esp/status/')} button component={Link}>
<ListItem to='/ems-esp/' selected={path.startsWith('/ems-esp/status') || path.startsWith('/ems-esp/devices') || path.startsWith('/ems-esp/help')} button component={Link}>
<ListItemIcon>
<SettingsRemoteIcon />
</ListItemIcon>
<ListItemText primary="Dashboard" />
</ListItem>
<ListItem to='/ems-esp/settings/' selected={path.startsWith('/ems-esp/settings/')} button component={Link} disabled={!authenticatedContext.me.admin}>
<ListItem to='/ems-esp/settings' selected={path.startsWith('/ems-esp/settings')} button component={Link} disabled={!authenticatedContext.me.admin}>
<ListItemIcon>
<SettingsIcon />
</ListItemIcon>

View File

@@ -20,7 +20,7 @@ class ProjectRouting extends Component {
* The "to" property must match one of the routes above for this to work correctly.
*/
}
<Redirect to={`/ems-esp/status/`} />
<Redirect to={`/ems-esp/status`} />
</Switch>
)
}