Changeset 07f4e8b for frontend/src/Components/SearchCriterias
- Timestamp:
- 01/24/24 17:42:28 (10 months ago)
- Branches:
- master
- Children:
- 0f5aa27
- Parents:
- 5528b99
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/SearchCriterias/SearchCriteriasBar.js
r5528b99 r07f4e8b 2 2 import { Container, Form, Button, Row, Col } from "react-bootstrap"; 3 3 import useFormData from "../Hooks/useFormData"; 4 <<<<<<< HEAD5 4 import SearchCriteriasHotel from "./SearchCriteriasHotel"; 6 5 import SearchCriteriasTransport from "./SearchCriteriasTransport"; 7 6 import SearchCriteriasRestaurant from "./SearchCriteriasRestaurant"; 8 =======9 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)10 7 11 const SearchCriterias = (props) => {8 const SearchCriteriasBar = (props) => { 12 9 13 const { formData, onFormChange, onCheckBoxChange, setFormData} = useFormData(props.criterias) 14 console.log("KRITERIUMI") 15 console.log(formData) 10 const { criterias, type } = props 16 11 17 <<<<<<< HEAD18 12 return ( 19 13 <> … … 24 18 ) 25 19 } 26 =======27 return (28 <>29 <Container30 className="p-1 pb-0 mb-5 mt-3 rounded-2"31 style={{ backgroundColor: "#002B5B", width: "65%"}}32 >33 <Form className="rounded-5">34 <Row className="gx-1">35 <Col>36 <Form.Floating className="mb-3">37 <Form.Control38 size="md"39 type="text"40 placeholder="Каде ќе патувате?:"41 id="location"42 name="hotelLocation"43 onChange={onFormChange}44 value={formData.hotelLocation}45 ></Form.Control>46 <label htmlFor="location">Локација:</label>47 </Form.Floating>48 </Col>49 <Col>50 <Form.Floating className="mb-3">51 <Form.Control52 size="md"53 type="date"54 placeholder="Датум на пристигнување:"55 id="dateFrom"56 name="dateFrom"57 onChange={onFormChange}58 value={formData.dateFrom}59 ></Form.Control>60 <label htmlFor="dateFrom">Датум на пристигнување:</label>61 </Form.Floating>62 </Col>63 <Col>64 <Form.Floating className="mb-3">65 <Form.Control66 size="md"67 type="date"68 placeholder="Датум на заминување:"69 id="dateTo"70 name="dateTo"71 onChange={onFormChange}72 value={formData.dateTo}73 ></Form.Control>74 <label htmlFor="dateTo">Датум на заминување:</label>75 </Form.Floating>76 </Col>77 <Col>78 <Form.Floating className="mb-3">79 <Form.Control80 size="md"81 type="number"82 placeholder="Број на гости:"83 id="floatingPassengers"84 name="numBeds"85 onChange={onFormChange}86 value={formData.numBeds}87 ></Form.Control>88 <label htmlFor="floatingPassengers">Број на гости:</label>89 </Form.Floating>90 </Col>91 <Col>92 <Form.Group className="my-1">93 <Button94 type="submit"95 style={{ backgroundColor: "#159895" }}96 size="lg"97 className="w-100"98 onClick={(e) => {99 e.preventDefault();100 window.location.href = `/search/hotel/${formData.hotelLocation}/${formData.dateFrom}/${formData.dateTo}/${formData.numBeds}`101 }}102 >103 <span className="ikona mx-3">Пребарај</span>104 </Button>105 </Form.Group>106 </Col>107 </Row>108 </Form>109 </Container>110 </>111 );112 };113 >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl)114 20 115 export default SearchCriterias ;21 export default SearchCriteriasBar;
Note:
See TracChangeset
for help on using the changeset viewer.