import React from "react"; import Pictograms from "./Pictograms"; import { useHistory } from "react-router-dom"; import { getTodayHours } from "../../Services.js"; function extractTags(tags) { var results = []; if (!tags) return results; for (let [key, value] of Object.entries(tags)) { if (value === true) { results.push(key); } } return results; } export default function CardRestaurant(props) { const history = useHistory(); const img = props.imgUrl; return (
history.push(`/restaurant/${props.id}`)} className="card-restaurant" >

{props.name}


Miasto: {props.city}

Dziƛ otwarte: {getTodayHours(props.hours)}

{props.description}

); }