source: frontend/src/Components/Listings/HotelListing.js@ 07f4e8b

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

prefinal fixes

  • Property mode set to 100644
File size: 5.4 KB
Line 
1import {Col, Container, Image, Row, Button} from "react-bootstrap";
2import {BsFillPersonFill} from "react-icons/bs";
3import {MdOutlineLocalOffer} from "react-icons/md";
4import {Link} from "react-router-dom";
5
6function HotelListing(props) {
7 console.log(props)
8 return (
9 <>
10 <Container
11 className="py-3 px-1 my-4"
12 style={{
13 border: "4px solid lightblue",
14 borderRadius: "1em",
15 boxShadow: "0 3px 5px lightblue",
16 maxWidth: "60%",
17 }}
18 >
19 <Row className="mx-1 my-1" style={{textAlign: "left"}}>
20 <Col className="d-flex justify-content-center">
21 <Image
22 src="https://www.imgacademy.com/sites/default/files/legacyhotel.jpg"
23 style={{
24 height: "15em",
25 borderRadius: "1em",
26 boxShadow: "0 4px 20px lightblue",
27 maxWidth: "100%",
28 }}
29 ></Image>
30 </Col>
31 <Col>
32 <Row>
33 <h3>{props.data.hotelName}</h3>
34 </Row>
35 <Row>
36 <h8>{props.data.hotelLocation}, Македонија</h8>
37 </Row>
38 <Row className="mt-3 ml-2">
39 <Col className="md-4">
40 <h4 style={{fontWeight: "bold"}}></h4>
41 </Col>
42 </Row>
43 <Row>
44 <Col className="ml-5">
45 {/* <h5>{props.data.hotelCaption}</h5> */}
46 <h5>Краток опис</h5>
47 </Col>
48 </Row>
49 <Row>
50 <Col>
51 <h6>{props.data.hotelDescripiton}</h6>
52 </Col>
53 </Row>
54 </Col>
55 <Col>
56 <Container
57 fluid
58 className="px-0"
59 style={{
60 display: "flex",
61 flexDirection: "column",
62 alignItems: "flex-end",
63 justifyContent: "space-between",
64 height: "100%",
65 }}
66 >
67 <Row className="justify-self-end" style={{textAlign: "right"}}>
68 <Col style={{textAlign: "right"}}>
69 <h6>Многу добро</h6>
70 </Col>
71 <Col>
72 <span
73 style={{
74 backgroundColor: "#159895",
75 padding: "0.75em",
76 fontWeight: "bold",
77 fontSize: "1.25rem",
78 borderRadius: "0.75em",
79 color: "white",
80 }}
81 >
82 {(props.data.hotelReviews.reduce((sum, r) => sum + r.numStar, 0) / props.data.hotelReviews.length).toFixed(1)}
83 </span>
84 </Col>
85 </Row>
86 <Row className="w-75 justify-self-end">
87 <Container
88 className="justify-self-end"
89 style={{textAlign: "right"}}
90 >
91 <Row>
92 <h4>{props.data.totalPrice}$</h4>
93 </Row>
94 <Row className="w-100">
95 <Link
96 to="/details/hotel"
97 state={{data: props.data, from: props.from, to: props.to}}
98 className="w-100"
99 >
100 <Button
101 className="m-2"
102 size="md"
103 style={{backgroundColor: "#159895"}}
104 onClick={() => {
105 }}
106 >
107 <MdOutlineLocalOffer size={"1.5em"}></MdOutlineLocalOffer>{" "}
108 Кон понудата
109 </Button>
110 </Link>
111 </Row>
112 </Container>
113 </Row>
114 </Container>
115 </Col>
116 </Row>
117 </Container>
118 </>
119 );
120}
121
122export default HotelListing;
Note: See TracBrowser for help on using the repository browser.