Merged in fix/SW-934-isAllUnavailable (pull request #939)

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

Approved-by: Bianca Widstam
Approved-by: Niclas Edenvin
This commit is contained in:
Pontus Dreij
2024-11-19 14:58:56 +00:00

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" })}