feat(SW-251): type assertion
This commit is contained in:
@@ -9,13 +9,11 @@ import styles from "./hotelCardListing.module.css"
|
||||
import { HotelCardListingProps } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps"
|
||||
|
||||
export default function HotelCardListing({ hotelData }: HotelCardListingProps) {
|
||||
if (!hotelData) return null
|
||||
|
||||
return (
|
||||
<section className={styles.hotelCards}>
|
||||
{hotelData && hotelData.length ? (
|
||||
hotelData.map((hotel) => (
|
||||
<HotelCard key={hotel.hotelData?.name} hotel={hotel} />
|
||||
<HotelCard key={hotel.hotelData.name} hotel={hotel} />
|
||||
))
|
||||
) : (
|
||||
<Title>No hotels found</Title>
|
||||
|
||||
Reference in New Issue
Block a user