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

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

images upload/download impl, other fixes

  • Property mode set to 100644
File size: 2.4 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 useGet from "../Components/Hooks/useGet";
7import {Navigate, useParams} from "react-router-dom";
8import {useAuth} from "../Components/Context/AuthContext";
9
10
11const HotelEditPage = () => {
12
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);
17
18
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 );
59};
60
61export default HotelEditPage;
Note: See TracBrowser for help on using the repository browser.