source: frontend/src/Pages/HotelEditPage.js@ ac19a0c

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

authContext impl, admin panel impl, search bar fixes, reservations listings impl

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