feat: SW-1583 City search Map view redemption

This commit is contained in:
Hrishikesh Vaipurkar
2025-03-05 19:08:54 +01:00
parent f6db5f2732
commit 23eaa772ea
11 changed files with 72 additions and 16 deletions

View File

@@ -12,6 +12,7 @@ import {
} from "@/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/utils"
import { getHotelSearchDetails } from "@/app/[lang]/(live)/(public)/hotelreservation/(standard)/utils"
import TrackingSDK from "@/components/TrackingSDK"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import { safeTry } from "@/utils/safeTry"
@@ -33,6 +34,7 @@ export async function SelectHotelMapContainer({
isAlternativeHotels,
}: SelectHotelMapContainerProps) {
const lang = getLang()
const intl = await getIntl()
const googleMapId = env.GOOGLE_DYNAMIC_MAP_ID
const googleMapsApiKey = env.GOOGLE_STATIC_MAP_KEY
const getHotelSearchDetailsPromise = safeTry(
@@ -58,6 +60,7 @@ export async function SelectHotelMapContainer({
childrenInRoomString,
hotel: isAlternativeFor,
bookingCode,
redemption,
} = searchDetails
if (!city) return notFound()
@@ -70,6 +73,7 @@ export async function SelectHotelMapContainer({
adults: adultsInRoom[0],
children: childrenInRoomString,
bookingCode,
redemption,
})
)
: bookingCode
@@ -90,6 +94,7 @@ export async function SelectHotelMapContainer({
roomStayEndDate: selectHotelParams.toDate,
adults: adultsInRoom[0],
children: childrenInRoomString,
redemption,
})
)
@@ -97,7 +102,10 @@ export async function SelectHotelMapContainer({
const validHotels = (hotels?.filter(Boolean) as HotelData[]) || []
const hotelPins = getHotelPins(validHotels)
const currencyValue = redemption
? intl.formatMessage({ id: "Points" })
: undefined
const hotelPins = getHotelPins(validHotels, currencyValue)
const filterList = getFiltersFromHotels(validHotels)
const cityCoordinates = await getCityCoordinates({
city: city.name,