[ac19a0c] | 1 | import React, {useState} from "react";
|
---|
| 2 | import {Container, Col, Row, Image} from "react-bootstrap";
|
---|
[e9b4ba9] | 3 | import Navigation from "../Components/Layout/Navbar/Navigation";
|
---|
| 4 | import ResourcesTab from "../Components/Resources/ResourcesTab";
|
---|
| 5 | import HotelEditTab from "../Components/HotelEdit/HotelEditTab";
|
---|
| 6 | import useGet from "../Components/Hooks/useGet";
|
---|
[ac19a0c] | 7 | import {Navigate, useParams} from "react-router-dom";
|
---|
| 8 | import {useAuth} from "../Components/Context/AuthContext";
|
---|
[e9b4ba9] | 9 |
|
---|
| 10 |
|
---|
| 11 | const 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 |
|
---|
| 61 | export default HotelEditPage;
|
---|