web client v 0.1

This commit is contained in:
2020-09-17 19:01:01 +02:00
parent 2b378fab25
commit 1c9d9e2021
20 changed files with 794 additions and 208 deletions

View File

@@ -11,6 +11,7 @@ import ExpandMore from "@material-ui/icons/ExpandMore";
import FastfoodIcon from "@material-ui/icons/Fastfood";
import AddIcon from "@material-ui/icons/Add";
import SettingsIcon from "@material-ui/icons/Settings";
import { useHistory } from "react-router-dom";
const useStyles = makeStyles((theme) => ({
root: {
@@ -33,6 +34,11 @@ export default function UserMenu(props) {
const handleClick = () => {
setOpen(!open);
};
const handleAddRestaurant = () => {
props.closeMenu();
history.push("/newRestaurant");
};
const history = useHistory();
return (
<List
@@ -58,7 +64,7 @@ export default function UserMenu(props) {
</ListItem>
<Collapse in={open} timeout="auto" unmountOnExit>
<List component="div" disablePadding>
<ListItem>
<ListItem button onClick={handleAddRestaurant}>
<ListItemIcon>
<AddIcon />
</ListItemIcon>