added profile #48
This commit is contained in:
@@ -3,7 +3,12 @@ import MenuItem from '@material-ui/core/MenuItem';
|
|||||||
import Menu from '@material-ui/core/Menu';
|
import Menu from '@material-ui/core/Menu';
|
||||||
import AccountCircle from '@material-ui/icons/AccountCircle';
|
import AccountCircle from '@material-ui/icons/AccountCircle';
|
||||||
import IconButton from '@material-ui/core/IconButton';
|
import IconButton from '@material-ui/core/IconButton';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
|
import Link1 from '@material-ui/core/Link';
|
||||||
|
|
||||||
|
function MenuItemLink(props) {
|
||||||
|
return <MenuItem component={Link1} {...props} />;
|
||||||
|
}
|
||||||
|
|
||||||
export default function AccountMenu(props) {
|
export default function AccountMenu(props) {
|
||||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||||
@@ -60,7 +65,7 @@ export default function AccountMenu(props) {
|
|||||||
open={openMenu}
|
open={openMenu}
|
||||||
onClose={handleClose}
|
onClose={handleClose}
|
||||||
>
|
>
|
||||||
<MenuItem onClick={handleClose}>Profile</MenuItem>
|
<MenuItemLink to={"/profile"} onClick={handleClose} component={Link}>Profile</MenuItemLink>
|
||||||
<MenuItem onClick={handleLogout}>Logout</MenuItem>
|
<MenuItem onClick={handleLogout}>Logout</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import {
|
|||||||
} from "react-router-dom";
|
} from "react-router-dom";
|
||||||
import SelectResource from './selectResource';
|
import SelectResource from './selectResource';
|
||||||
import ResourceChart from './resourcechart/resourcechart';
|
import ResourceChart from './resourcechart/resourcechart';
|
||||||
|
import Profile from './profile/profile';
|
||||||
|
|
||||||
|
|
||||||
const useStyles = makeStyles(theme => ({
|
const useStyles = makeStyles(theme => ({
|
||||||
@@ -23,6 +24,7 @@ export default function Content() {
|
|||||||
|
|
||||||
<div className={classes.root}>
|
<div className={classes.root}>
|
||||||
<Route exact path="/" component={Overview} />
|
<Route exact path="/" component={Overview} />
|
||||||
|
<Route path="/profile" component={Profile} />
|
||||||
<Route path="/resources" component={SelectResource} />
|
<Route path="/resources" component={SelectResource} />
|
||||||
<Route path="/resourcechart/:id" component={ResourceChart} />
|
<Route path="/resourcechart/:id" component={ResourceChart} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
12
frontend/src/components/profile/profile.js
Normal file
12
frontend/src/components/profile/profile.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import Typography from '@material-ui/core/Typography';
|
||||||
|
|
||||||
|
export default function Profile(props) {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Typography variant="h4">
|
||||||
|
Profile Page
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -2,12 +2,10 @@ import React from 'react';
|
|||||||
import { makeStyles } from '@material-ui/core/styles';
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
import Card from '@material-ui/core/Card';
|
import Card from '@material-ui/core/Card';
|
||||||
import CardContent from '@material-ui/core/CardContent';
|
import CardContent from '@material-ui/core/CardContent';
|
||||||
import Typography from '@material-ui/core/Typography';
|
|
||||||
import Grid from '@material-ui/core/Grid';
|
import Grid from '@material-ui/core/Grid';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import Link1 from '@material-ui/core/Link';
|
import Link1 from '@material-ui/core/Link';
|
||||||
import ListItem from '@material-ui/core/ListItem';
|
import ListItem from '@material-ui/core/ListItem';
|
||||||
import ListItemText from '@material-ui/core/ListItemText';
|
|
||||||
import ListItemIcon from '@material-ui/core/ListItemIcon';
|
import ListItemIcon from '@material-ui/core/ListItemIcon';
|
||||||
import Tooltip from '@material-ui/core/Tooltip';
|
import Tooltip from '@material-ui/core/Tooltip';
|
||||||
import Zoom from '@material-ui/core/Zoom';
|
import Zoom from '@material-ui/core/Zoom';
|
||||||
|
|||||||
Reference in New Issue
Block a user