improvements to EMS-ESP web status page

This commit is contained in:
proddy
2020-07-06 13:31:07 +02:00
parent 4fb88fbcac
commit 85debcbebe
4 changed files with 167 additions and 150 deletions

View File

@@ -1,27 +1,30 @@
import React, { Component } from 'react';
import { Link, withRouter, RouteComponentProps } from 'react-router-dom';
import React, { Component } from "react";
import { Link, withRouter, RouteComponentProps } from "react-router-dom";
import { List, ListItem, ListItemIcon, ListItemText } from '@material-ui/core';
import SettingsRemoteIcon from '@material-ui/icons/SettingsRemote';
import { List, ListItem, ListItemIcon, ListItemText } from "@material-ui/core";
import SettingsRemoteIcon from "@material-ui/icons/SettingsRemote";
import { PROJECT_PATH } from '../api';
import { PROJECT_PATH } from "../api";
class ProjectMenu extends Component<RouteComponentProps> {
render() {
const path = this.props.match.url;
return (
<List>
<ListItem to={`/${PROJECT_PATH}/`} selected={path.startsWith(`/${PROJECT_PATH}/`)} button component={Link}>
<ListItem
to={`/${PROJECT_PATH}/`}
selected={path.startsWith(`/${PROJECT_PATH}/`)}
button
component={Link}
>
<ListItemIcon>
<SettingsRemoteIcon />
</ListItemIcon>
<ListItemText primary="EMS-ESP" />
</ListItem>
</List>
)
);
}
}
export default withRouter(ProjectMenu);