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