Files
web/components/HotelReservation/HotelCardListing/index.tsx
2024-10-02 08:55:05 +02:00

24 lines
667 B
TypeScript

import Title from "@/components/TempDesignSystem/Text/Title"
import HotelCard from "../HotelCard"
import styles from "./hotelCardListing.module.css"
import { HotelCardListingProps } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps"
export default function HotelCardListing({ hotelData }: HotelCardListingProps) {
// TODO: filter with url params
return (
<section className={styles.hotelCards}>
{hotelData && hotelData.length ? (
hotelData.map((hotel) => (
<HotelCard key={hotel.hotelData.name} hotel={hotel} />
))
) : (
<Title>No hotels found</Title>
)}
</section>
)
}