feat(SW-629): Added no availabilty if no hotels are listed

This commit is contained in:
Pontus Dreij
2024-11-14 16:23:44 +01:00
parent a6a0b0cf15
commit d158aca6fd
10 changed files with 72 additions and 25 deletions

View File

@@ -71,19 +71,17 @@ export default function HotelCardListing({
return (
<section className={styles.hotelCards}>
{hotels?.length ? (
hotels.map((hotel) => (
<HotelCard
key={hotel.hotelData.operaId}
hotel={hotel}
type={type}
state={hotel.hotelData.name === activeCard ? "active" : "default"}
onHotelCardHover={onHotelCardHover}
/>
))
) : (
<Title>No hotels found</Title>
)}
{hotels?.length
? hotels.map((hotel) => (
<HotelCard
key={hotel.hotelData.operaId}
hotel={hotel}
type={type}
state={hotel.hotelData.name === activeCard ? "active" : "default"}
onHotelCardHover={onHotelCardHover}
/>
))
: null}
</section>
)
}