feat(BOOK-463): Fetching hotel filters from CMS and using these inside the destination pages and select hotel page
* feat(BOOK-463): Fetching hotel filters from CMS and using these inside the destination pages * fix(BOOK-698): fetch hotel filters from CMS on select hotel page Approved-by: Bianca Widstam
This commit is contained in:
@@ -9,7 +9,10 @@ import BookingCodeFilter from "../BookingCodeFilter"
|
||||
import HotelCardListing from "../HotelCardListing"
|
||||
import { StaticMap } from "../StaticMap"
|
||||
import HotelFilter from "./Filters/HotelFilter"
|
||||
import { getFiltersFromHotels, type HotelResponse } from "./helpers"
|
||||
import {
|
||||
fetchHotelFiltersAndMapToCategorizedFilters,
|
||||
type HotelResponse,
|
||||
} from "./helpers"
|
||||
import HotelCount from "./HotelCount"
|
||||
import HotelSorter from "./HotelSorter"
|
||||
import { MapWithButtonWrapper } from "./MapWithButtonWrapper"
|
||||
@@ -35,7 +38,7 @@ interface SelectHotelProps {
|
||||
topSlot?: ReactNode
|
||||
}
|
||||
|
||||
export function SelectHotel({
|
||||
export async function SelectHotel({
|
||||
bookingCode,
|
||||
city,
|
||||
hotels,
|
||||
@@ -61,7 +64,11 @@ export function SelectHotel({
|
||||
|
||||
const showBookingCodeFilter = isBookingCodeRateAvailable && !isSpecialRate
|
||||
|
||||
const filterList = getFiltersFromHotels(hotels, showBookingCodeFilter)
|
||||
const filterList = await fetchHotelFiltersAndMapToCategorizedFilters(
|
||||
hotels,
|
||||
showBookingCodeFilter,
|
||||
lang
|
||||
)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user