Dish cards

This commit is contained in:
2020-07-30 21:04:13 +02:00
parent ad2a945965
commit bf609fc5cd
14 changed files with 173 additions and 2 deletions

View File

@@ -1,9 +1,12 @@
import React from "react";
import Pictograms from "./Pictograms";
import DishList from "./DishList";
import CircularProgress from "@material-ui/core/CircularProgress";
import { useSelector } from "react-redux";
export default function Restaurant(props) {
const restaurant = useSelector((state) => state.restaurant);
const showDishList = useSelector((state) => state.toggles.showDishList);
function extractTags(tags) {
var results = [];
for (let [key, value] of Object.entries(tags)) {
@@ -26,7 +29,10 @@ export default function Restaurant(props) {
</div>
<h1>{restaurant.name}</h1>
<p>{restaurant.city}</p>
<hr />
<div className="restaurant-dishes">
{showDishList === false && <CircularProgress />}
{showDishList === true && <DishList />}
</div>
</div>
);
}