fix(SW-934): Change logic to isAllUnavailable instad of hotels.length

This commit is contained in:
Pontus Dreij
2024-11-19 15:36:20 +01:00
parent d43c29e394
commit ab9c8012c9

View File

@@ -66,6 +66,8 @@ export default async function SelectHotelPage({
const filterList = getFiltersFromHotels(hotels)
const isAllUnavailable = hotels.every((hotel) => hotel.price === undefined)
return (
<>
<header className={styles.header}>
@@ -123,7 +125,7 @@ export default async function SelectHotelPage({
<HotelFilter filters={filterList} className={styles.filter} />
</div>
<div className={styles.hotelList}>
{!hotels.length && (
{isAllUnavailable && (
<Alert
type={AlertTypeEnum.Info}
heading={intl.formatMessage({ id: "No availability" })}