web client v0.10 (restaurant view)

This commit is contained in:
2020-10-05 19:33:52 +02:00
parent b3ade3de7d
commit 06728d32f1
12 changed files with 146 additions and 50 deletions

View File

@@ -7,6 +7,7 @@ import { extractTags } from "../../Services";
import { useSelector, useDispatch } from "react-redux";
import { fetchRestaurant } from "../../actions";
import GoogleMapStatic from "./GoogleMapStatic";
import WorkingHours from "./WorkingHours";
export default function Restaurant(props) {
const restaurant = useSelector((state) => state.restaurant);
@@ -33,23 +34,29 @@ export default function Restaurant(props) {
<h1>{restaurant.name}</h1>
<p>{restaurant.description}</p>
<hr />
<div className="restaurant-pictograms">
<PictogramsSeparate pictograms={extractTags(restaurant.tags)} />
</div>
<hr />
<h5>Informacje</h5>
<p>
Adres:{" "}
<span className="restaurant-span">
{restaurant.city}, {restaurant.adress}
</span>
</p>
<p>Godziny pracy: </p>
{restaurant.phone && (
<p>
Kontakt:{" "}
<span className="restaurant-span">{restaurant.phone}</span>
</p>
)}
<WorkingHours hours={restaurant.workingHours} />
<hr />
<div className="restaurant-pictograms">
<PictogramsSeparate pictograms={extractTags(restaurant.tags)} />
</div>
<h5>Lokalizacja</h5>
{restaurant.location && (
<GoogleMapStatic coordinates={restaurant.location.coordinates} />
)}
</div>
</div>
<div className="restaurant-content">