[e6c2521] | 1 | import React, { useState } from "react";
|
---|
| 2 | import { Container, Col, Row, Image } from "react-bootstrap";
|
---|
| 3 | import Navigation from "../Components/Layout/Navbar/Navigation";
|
---|
| 4 | import ResourcesTab from "../Components/Resources/ResourcesTab";
|
---|
| 5 | import HotelEditTab from "../Components/HotelEdit/HotelEditTab";
|
---|
| 6 | import RestaurantEditTab from "../Components/RestaurantEdit/RestaurantEditTab";
|
---|
| 7 | import useGet from "../Components/Hooks/useGet";
|
---|
[5528b99] | 8 | import { useParams, useSearchParams } from "react-router-dom";
|
---|
[e6c2521] | 9 |
|
---|
| 10 | const RestaurantEditPage = () => {
|
---|
| 11 |
|
---|
| 12 | const params = useParams();
|
---|
| 13 | const link = "/restaurant/" + params.restaurantId;
|
---|
| 14 | //const [changed, setChanged] = useState(0)
|
---|
| 15 | const { data, setData, isLoading, getData, setChanged } = useGet(link, "");
|
---|
| 16 |
|
---|
| 17 | return (
|
---|
| 18 | <>
|
---|
| 19 | <Navigation />
|
---|
| 20 | {!isLoading && <Container>
|
---|
| 21 | <Row className="mb-5">
|
---|
| 22 | <h2 style={{ color: "#159895", textAlign: "left" }}>Мои ресурси</h2>
|
---|
| 23 | </Row>
|
---|
| 24 | <Row className="mb-5">
|
---|
| 25 | <Col>
|
---|
| 26 | <Row className="d-flex mb-3">
|
---|
| 27 | <Col
|
---|
| 28 | className="d-flex justify-content-center"
|
---|
| 29 | style={{ maxWidth: "30%" }}
|
---|
| 30 | >
|
---|
| 31 | <Image
|
---|
| 32 | src="https://t3.ftcdn.net/jpg/05/16/27/58/360_F_516275801_f3Fsp17x6HQK0xQgDQEELoTuERO4SsWV.jpg"
|
---|
| 33 | style={{
|
---|
| 34 | height: "5em",
|
---|
| 35 | borderRadius: "50%",
|
---|
| 36 | maxWidth: "100%",
|
---|
| 37 | }}
|
---|
| 38 | className="m-auto"
|
---|
| 39 | ></Image>
|
---|
| 40 | </Col>
|
---|
| 41 | <Col className="d-flex justify-content-center">
|
---|
| 42 | <Container className="pt-2" style={{ textAlign: "left" }}>
|
---|
| 43 | <h4>{data.restaurantName}</h4>
|
---|
| 44 | <h5>{data.restaurantLocation}</h5>
|
---|
| 45 | </Container>
|
---|
| 46 | </Col>
|
---|
| 47 | </Row>
|
---|
| 48 | </Col>
|
---|
| 49 | </Row>
|
---|
| 50 | <Row>
|
---|
| 51 | <RestaurantEditTab refresh={setChanged} displayMenu={data} edit="true"/>
|
---|
| 52 | </Row>
|
---|
| 53 | </Container>}
|
---|
| 54 | </>
|
---|
| 55 | );
|
---|
| 56 | };
|
---|
| 57 |
|
---|
| 58 | export default RestaurantEditPage;
|
---|