Changeset 5528b99 for frontend/src/Components/Tab
- Timestamp:
- 01/16/24 16:34:03 (10 months ago)
- Branches:
- master
- Children:
- 07f4e8b
- Parents:
- e6c2521
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
frontend/src/Components/Tab/TabFormTransport.js
re6c2521 r5528b99 2 2 import { Button, Col, Container, Form, Row } from "react-bootstrap"; 3 3 import { HiMagnifyingGlass } from "react-icons/hi2" 4 import useFormData from "../Hooks/useFormData";5 4 6 5 function TabFormTransport() { 7 8 const { formData, onFormChange, setFormData } = useFormData({9 from: undefined,10 to: undefined,11 date: undefined,12 numPassengers: 013 })14 15 6 return ( 16 7 <Form> … … 23 14 placeholder="Од:" 24 15 id="floatingFrom" 25 value={formData.from}26 name={'from'}27 onChange={onFormChange}28 16 ></Form.Control> 29 17 <label htmlFor="floatingFrom">Од:</label> … … 37 25 placeholder="До:" 38 26 id="floatingTo" 39 name={'to'}40 value={formData.to}41 onChange={onFormChange}42 27 ></Form.Control> 43 28 <label htmlFor="floatingTo">До:</label> … … 51 36 placeholder="Датум:" 52 37 id="floatingDate" 53 name={'date'}54 value={formData.date}55 onChange={onFormChange}56 38 ></Form.Control> 57 39 <label htmlFor="floatingDate">Датум:</label> … … 64 46 type="number" 65 47 placeholder="Број на патници:" 66 name={'numPassengers'}67 48 id="floatingPassengers" 68 value={formData.numPassengers}69 onChange={onFormChange}70 49 ></Form.Control> 71 50 <label htmlFor="floatingPassengers">Број на патници:</label> 72 51 </Form.Floating> 73 52 <Form.Group className="my-1"> 74 <Button type="submit" style={{backgroundColor: "#159895"}} size="lg" onClick={(e) => { 75 e.preventDefault(); 76 window.location.href = `/search/transport/${formData.from}/${formData.to}/${formData.date}/${formData.numPassengers}` 77 }}> 53 <Button type="submit" style={{backgroundColor: "#159895"}} size="lg"> 78 54 <span className="ikona my-1"><HiMagnifyingGlass/></span> 79 55 <span className="ikona mx-3">Пребарај</span>
Note:
See TracChangeset
for help on using the changeset viewer.