web client v0.3

+ restaurant view
+ restaurants list
This commit is contained in:
2020-09-23 18:42:15 +02:00
parent 68ecf13aa1
commit e19b767c12
6 changed files with 108 additions and 44 deletions

View File

@@ -5,6 +5,7 @@ import ListItem from "@material-ui/core/ListItem";
import FastfoodIcon from "@material-ui/icons/Fastfood";
import Badge from "@material-ui/core/Badge";
import { makeStyles } from "@material-ui/core/styles";
import { useHistory } from "react-router-dom";
const useStyles = makeStyles((theme) => ({
root: {
@@ -24,6 +25,7 @@ const useStyles = makeStyles((theme) => ({
}));
export default function ListItemRestaurant(props) {
const history = useHistory();
const styles = useStyles();
const badgeData = {
color: "",
@@ -41,7 +43,10 @@ export default function ListItemRestaurant(props) {
badgeInit();
return (
<ListItem button>
<ListItem
button
onClick={() => history.push(`/editRestaurant/${props.id}`)}
>
<ListItemIcon>
<Badge
className={styles.root}