Dish cards
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user