source: frontend/src/Pages/RestaurantEditPage.js@ 0f5aa27

Last change on this file since 0f5aa27 was 07f4e8b, checked in by darsov2 <62809499+darsov2@…>, 5 months ago

prefinal fixes

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