source: frontend/src/Pages/HotelDetailsPage.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: 5.6 KB
Line 
1import React from "react";
2import LoginForm from "../Components/Login/LoginForm";
3import { Container, Row, Col, Form } from "react-bootstrap";
4import Navigation from "../Components/Layout/Navbar/Navigation";
5import Carousel from "react-bootstrap/Carousel";
6import { useState } from "react";
7import DescriptionContainer from "../Components/HotelDetails/DescriptionContainer";
8import ReviewsCarousel from "../Components/HotelDetails/ReviewsCarousel";
9import RoomsTable from "../Components/HotelDetails/RoomsTable";
10import ContactBar from "../Components/HotelDetails/ContactBar";
11import { useLocation } from "react-router-dom";
12
13const HotelDetailsPage = (props) => {
14 document.body.style.backgroundColor = "white";
15
16 const [index, setIndex] = useState(0);
17
18 const location = useLocation();
19 const { data, from, to } = location.state;
20 console.log(location)
21 console.log("DETAILS ")
22 console.log(data)
23
24 const handleSelect = (selectedIndex) => {
25 setIndex(selectedIndex);
26 };
27
28 return (
29 <>
30 <Navigation />
31 <Container className="my-3">
32 <Row className="d-flex justify-content-between">
33 <Col style={{textAlign: "left"}}>
34 <h2 style={{color: "#159895"}}>{data.hotelName}</h2>
35 </Col>
36 <Col>
37 <Container>
38 <Row className="mb-4">
39 <Col style={{textAlign: "right"}}>
40 <span
41 style={{
42 backgroundColor: "#159895",
43 padding: "0.75em",
44 fontWeight: "bold",
45 fontSize: "1.25rem",
46 borderRadius: "0.75em",
47 color: "white",
48 }}
49 >
50 9.1
51 </span>
52 </Col>
53 </Row>
54 </Container>
55 </Col>
56 </Row>
57 <Row>
58 <Col
59 className="p-3 rounded-4"
60 sm={3}
61 style={{ backgroundColor: "#002B5B" }}
62 >
63 <Row>
64 <h3 className="mb-5 mt-3" style={{color: "white"}}>Критериуми од пребарувањето</h3>
65 <Form.Floating className="mb-3">
66 <Form.Control
67 size="md"
68 type="text"
69 placeholder="Каде ќе патувате?:"
70 id="location"
71 ></Form.Control>
72 <label htmlFor="location">Локација:</label>
73 </Form.Floating>
74 </Row>
75 <Row>
76 <Form.Floating className="mb-3">
77 <Form.Control
78 size="md"
79 type="date"
80 placeholder="Датум на пристигнување:"
81 id="dateFrom"
82 ></Form.Control>
83 <label htmlFor="dateFrom">Датум на пристигнување:</label>
84 </Form.Floating>
85 </Row>
86 <Row>
87 <Form.Floating className="mb-3">
88 <Form.Control
89 size="md"
90 type="date"
91 placeholder="Датум на заминување:"
92 id="dateTo"
93 ></Form.Control>
94 <label htmlFor="dateTo">Датум на заминување:</label>
95 </Form.Floating>
96 </Row>
97 <Row>
98 <Form.Floating className="mb-3">
99 <Form.Control
100 size="md"
101 type="number"
102 placeholder="Број на гости:"
103 id="floatingPassengers"
104 ></Form.Control>
105 <label htmlFor="floatingPassengers">Број на гости:</label>
106 </Form.Floating>
107 </Row>
108 </Col>
109 <Col>
110 <Container>
111 <Row>
112 <Carousel activeIndex={index} onSelect={handleSelect}>
113 <Carousel.Item>
114 <img
115 className="d-block w-100 h-400 rounded-5"
116 src="https://www.kovz.gov.mk/articleImage.img/2022/08/05/JPG_010_-_Jovan_Kaneo_church_in_Ohrid__panorama-min.jpg"
117 alt="First slide"
118 style={{ height: "50vh" }}
119 />
120 </Carousel.Item>
121 <Carousel.Item>
122 <img
123 className="d-block w-100 rounded-5"
124 src="https://macedonia-timeless.com/wp-content/uploads/2018/08/dojran-ezero.jpg"
125 alt="Second slide"
126 style={{ height: "50vh" }}
127 />
128 </Carousel.Item>
129 <Carousel.Item>
130 <img
131 className="d-block w-100 rounded-5"
132 src="https://i.imgur.com/NFlxbqY.jpg"
133 alt="Third slide"
134 style={{ height: "50vh" }}
135 />
136 </Carousel.Item>
137 </Carousel>
138 </Row>
139 <Row>
140 <Container></Container>
141 </Row>
142 </Container>
143 </Col>
144 </Row>
145 <Row className="mb-5">
146 <Col className="col-md-8"><DescriptionContainer data={data.hotelDescripiton} type="hotel"></DescriptionContainer></Col>
147 <Col className="col-md-4"><ReviewsCarousel></ReviewsCarousel></Col>
148 </Row>
149 <Row className="mb-3"><RoomsTable from={from} to={to} data={data.hotelRooms}></RoomsTable></Row>
150 <Row><ContactBar></ContactBar></Row>
151 </Container>
152 </>
153 );
154};
155
156export default HotelDetailsPage;
Note: See TracBrowser for help on using the repository browser.