2019-07-06 23:56:30 +01:00
|
|
|
import React, { Component } from 'react';
|
2020-02-09 10:21:13 +00:00
|
|
|
import { Link, withRouter, RouteComponentProps } from 'react-router-dom';
|
2019-07-06 23:56:30 +01:00
|
|
|
|
2020-02-09 10:21:13 +00:00
|
|
|
import {List, ListItem, ListItemIcon, ListItemText} from '@material-ui/core';
|
2019-07-06 23:56:30 +01:00
|
|
|
import SettingsRemoteIcon from '@material-ui/icons/SettingsRemote';
|
|
|
|
|
2020-02-09 10:21:13 +00:00
|
|
|
import { PROJECT_PATH } from '../api';
|
|
|
|
|
|
|
|
class ProjectMenu extends Component<RouteComponentProps> {
|
2019-07-06 23:56:30 +01:00
|
|
|
|
|
|
|
render() {
|
|
|
|
const path = this.props.match.url;
|
|
|
|
return (
|
|
|
|
<List>
|
|
|
|
<ListItem to={`/${PROJECT_PATH}/demo/`} selected={path.startsWith(`/${PROJECT_PATH}/demo/`)} button component={Link}>
|
|
|
|
<ListItemIcon>
|
|
|
|
<SettingsRemoteIcon />
|
|
|
|
</ListItemIcon>
|
2021-03-07 17:45:03 +01:00
|
|
|
<ListItemText primary="WordClock" />
|
2019-07-06 23:56:30 +01:00
|
|
|
</ListItem>
|
|
|
|
</List>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export default withRouter(ProjectMenu);
|