import React, { useEffect } from "react"; import PictogramsSeparate from "./PictogramsSeparate"; import DishList from "./DishList"; import CircularProgress from "@material-ui/core/CircularProgress"; import { useParams } from "react-router-dom"; import { extractTags } from "../../Services"; import { useSelector, useDispatch } from "react-redux"; import { fetchRestaurant } from "../../actions"; import GoogleMapStatic from "./GoogleMapStatic"; import WorkingHours from "./WorkingHours"; import Social from "./Social"; import LunchMenu from "./LunchMenu"; export default function Restaurant(props) { const restaurant = useSelector((state) => state.restaurant); const { id } = useParams(); const dispatch = useDispatch(); const showDishList = useSelector((state) => state.data.showDishList); useEffect(() => { dispatch(fetchRestaurant(id)); }, [dispatch, id]); if (restaurant.name) document.title = restaurant.name; return (
{restaurant.description}
Adres:{" "} {restaurant.city}, {restaurant.adress}
{restaurant.phone && (Kontakt:{" "} {restaurant.phone}
)} {restaurant.links && ({restaurant.lunchHours}
)}