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