Changeset 5528b99 for frontend/src/Pages/HotelEditPage.js
- Timestamp:
- 01/16/24 16:34:03 (9 months ago)
- Branches:
- master
- Children:
- 07f4e8b
- Parents:
- e6c2521
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Pages/HotelEditPage.js
re6c2521 r5528b99 1 import React, { useState} from "react";2 import { Container, Col, Row, Image} from "react-bootstrap";1 import React, { useState } from "react"; 2 import { Container, Col, Row, Image } from "react-bootstrap"; 3 3 import Navigation from "../Components/Layout/Navbar/Navigation"; 4 4 import ResourcesTab from "../Components/Resources/ResourcesTab"; 5 5 import HotelEditTab from "../Components/HotelEdit/HotelEditTab"; 6 6 import useGet from "../Components/Hooks/useGet"; 7 import {Navigate, useParams} from "react-router-dom"; 8 import {useAuth} from "../Components/Context/AuthContext"; 7 import { useParams } from "react-router-dom"; 9 8 10 9 11 10 const HotelEditPage = () => { 12 11 13 14 15 16 const {data, setData, isLoading, getData} = useGet(link, changed);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); 17 16 18 17 19 20 21 22 <Navigation/>23 24 25 <h2 style={{color: "#159895", textAlign: "left"}}>Мои ресурси</h2>26 27 28 29 30 31 32 style={{maxWidth: "30%"}}33 34 35 36 37 38 39 40 41 42 43 44 45 <Container className="pt-2" style={{textAlign: "left"}}>46 47 48 49 50 51 52 53 54 55 56 57 58 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 ); 59 58 }; 60 59
Note:
See TracChangeset
for help on using the changeset viewer.