import React from "react"; import Pictograms from "./Pictograms"; import { extractTags } from "../../Services"; import { useHistory } from "react-router-dom"; import KeyboardArrowRightIcon from "@material-ui/icons/KeyboardArrowRight"; export default function CardDish(props) { const history = useHistory(); const { name, price, imgUrl, weight, vegan, vegetarian, allergens, _id, } = props.dish; return (
history.push(`/dish/${_id}`)} >

{name}

Porcja: {weight}

{vegan && "Danie wegańskie | "} {vegetarian && "Danie wegetariańskie"}

{!props.hidePrice && `${price} zł`}
); }