fix(SW-934): Change logic to isAllUnavailable instad of hotels.length
This commit is contained in:
@@ -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" })}
|
||||
|
||||
Reference in New Issue
Block a user