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:
Erik Tiekstra
2025-02-12 09:15:33 +00:00
parent 3901c3ac77
commit bcfa84324f
33 changed files with 2211 additions and 187 deletions

View File

@@ -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()