source: frontend/src/Pages/RestaurantEditPage.js@ e9b4ba9

Last change on this file since e9b4ba9 was e9b4ba9, checked in by darsov2 <62809499+darsov2@…>, 9 months ago

prototype

  • Property mode set to 100644
File size: 2.0 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 { useParams, useSearchParams } from "react-router-dom";
9
10const 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
58export default RestaurantEditPage;
Note: See TracBrowser for help on using the repository browser.