import React from "react"; import Navigation from '../Components/Layout/Navbar/Navigation'; import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/js/bootstrap.js'; import HomeCarousel from '../Components/Layout/CarouselHome/Carousel'; import { Card, Container, Nav, Row, Col } from 'react-bootstrap'; import TabComponent from '../Components/Tab/Tab'; import Offers from '../Components/Layout/Offers/Offers'; import MostVisitedBar from '../Components/MostVisited/MostVisitedBar'; import MostPopularRoutesCont from '../Components/MostPopularRoutes/MostPopularRoutesCont'; import BecomeAHost from "../Components/BecomeAHost/BecomeAHost" import HotelLisitng from "../Components/Listings/HotelListing" import SearchCriterias from "../Components/SearchCriterias/SearchCriteriasBar"; import SortButton from "../Components/Listings/SortButton"; import FilterButton from "../Components/Listings/FilterButton"; import TransportListing from "../Components/Listings/TransportListing"; import useGet from "../Components/Hooks/useGet"; import { useParams } from "react-router-dom"; <<<<<<< HEAD import SearchCriteriasBar from "../Components/SearchCriterias/SearchCriteriasBar"; import RestaurantDetailsPage from "./RestaurantDetailsPage"; import RestaurantListing from "../Components/Listings/RestaurantListing"; ======= >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl) const SearchPage = (props) => { const params = useParams(); console.log(params) document.body.style.backgroundColor = "white" var hotelData = { "hotelName": "Име на сместувањето", "hotelLocation": "Скопје, Македонија", "hotelCaption": "Краток опис", "hotelDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation", "hotelPrice": 504.99, "hotelRating": 9.1 } <<<<<<< HEAD let link = props.type === "transport" ? `/transport/search?from=${params.from}&to=${params.to}&date=${params.date}&numPassengers=${params.numPassengers}` : props.type === "hotel" ? `/hotel/search?hotelLocation=${params.hotelLocation}&dateFrom=${params.dateFrom}&dateTo=${params.dateTo}&numBeds=${params.numBeds}` : `/restaurant/search?restaurantLocation=${params.restaurantLocation}&date=${params.date}&hourFrom=${params.hourFrom}&hourTo=${params.hourTo}&numPeople=${params.numPeople}` ======= let link = props.type === "transport" ? `/transport/search?from=${params.from}&to=${params.to}&date=${params.date}` : props.type === "hotel" ? `/hotel/search?hotelLocation=${params.hotelLocation}&dateFrom=${params.dateFrom}&dateTo=${params.dateTo}&numBeds=${params.numBeds}` : "" >>>>>>> parent of ac19a0c (authContext impl, admin panel impl, search bar fixes, reservations listings impl) console.log(link) console.log(params.date) const { data, isLoading, getData, setData } = useGet(link); !isLoading && console.log(data) return ( <> {props.type === "hotel" && !isLoading && data && {data.map(hotel => { return })} } {props.type === "transport" && !isLoading && data && {data.map(transport => { return })} } {props.type === "restaurant" && !isLoading && data && {data.map(restaurant => { return })} } ) } export default SearchPage;