web client v0.6 (add dish)
This commit is contained in:
@@ -53,6 +53,8 @@ export default function EditRestaurant(props) {
|
||||
color: "",
|
||||
secondaryText: "",
|
||||
};
|
||||
const restaurant = restaurants.find(matchId);
|
||||
if (restaurant === undefined) history.push("/");
|
||||
const badgeInit = () => {
|
||||
if (
|
||||
!restaurant.subscriptionActive ||
|
||||
@@ -73,8 +75,6 @@ export default function EditRestaurant(props) {
|
||||
function matchId(element) {
|
||||
return element._id === id;
|
||||
}
|
||||
const restaurant = restaurants.find(matchId);
|
||||
if (restaurant === undefined) history.push("/");
|
||||
badgeInit();
|
||||
|
||||
return (
|
||||
@@ -153,7 +153,10 @@ export default function EditRestaurant(props) {
|
||||
</ListItemIcon>
|
||||
<ListItemText primary="Menu" />
|
||||
</ListItem>
|
||||
<ListItem button>
|
||||
<ListItem
|
||||
button
|
||||
onClick={() => history.push(`/newDish/${restaurant._id}`)}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<AddIcon color="primary" />
|
||||
</ListItemIcon>
|
||||
|
||||
Reference in New Issue
Block a user