Merged in feat/SW-1456-country-dynamic-map (pull request #1310)
feat(SW-1456): Added map and fetching hotels by country * feat(SW-1456): Added map and fetching hotels by country Approved-by: Fredrik Thorsson Approved-by: Matilda Landström
This commit is contained in:
@@ -13,7 +13,7 @@ import type {
|
||||
} from "@/types/trpc/routers/hotel/hotel"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
import type {
|
||||
GetHotelsInput,
|
||||
GetHotelsByCSFilterInput,
|
||||
GetRoomsAvailabilityInput,
|
||||
GetSelectedRoomAvailabilityInput,
|
||||
} from "@/server/routers/hotels/input"
|
||||
@@ -67,10 +67,10 @@ export const getUserTracking = cache(async function getMemoizedUserTracking() {
|
||||
return serverClient().user.tracking()
|
||||
})
|
||||
|
||||
export const getHotels = cache(async function getMemoizedHotels(
|
||||
input: GetHotelsInput
|
||||
export const getHotelsByCSFilter = cache(async function getMemoizedHotels(
|
||||
input: GetHotelsByCSFilterInput
|
||||
) {
|
||||
return serverClient().hotel.hotels.get(input)
|
||||
return serverClient().hotel.hotels.byCSFilter.get(input)
|
||||
})
|
||||
|
||||
export const getHotel = cache(async function getMemoizedHotelData(
|
||||
@@ -206,6 +206,13 @@ export const getDestinationCityPagesByCountry = cache(
|
||||
})
|
||||
}
|
||||
)
|
||||
export const getHotelsByCountry = cache(
|
||||
async function getMemoizedHotelsByCountry(country: Country) {
|
||||
return serverClient().hotel.hotels.byCountry.get({
|
||||
country,
|
||||
})
|
||||
}
|
||||
)
|
||||
export const getDestinationCityPage = cache(
|
||||
async function getMemoizedDestinationCityPage() {
|
||||
return serverClient().contentstack.destinationCityPage.get()
|
||||
|
||||
Reference in New Issue
Block a user