feat: SW-1583 City search Map view redemption
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import type { HotelData } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps"
|
||||
import type { HotelPin } from "@/types/components/hotelReservation/selectHotel/map"
|
||||
|
||||
export function getHotelPins(hotels: HotelData[]): HotelPin[] {
|
||||
export function getHotelPins(
|
||||
hotels: HotelData[],
|
||||
currencyValue?: string
|
||||
): HotelPin[] {
|
||||
if (hotels.length === 0) return []
|
||||
|
||||
return hotels
|
||||
@@ -14,11 +17,14 @@ export function getHotelPins(hotels: HotelData[]): HotelPin[] {
|
||||
name: hotel.hotelData.name,
|
||||
publicPrice: hotel.price?.public?.localPrice.pricePerNight ?? null,
|
||||
memberPrice: hotel.price?.member?.localPrice.pricePerNight ?? null,
|
||||
redemptionPrice:
|
||||
hotel.price?.redemption?.localPrice.pointsPerNight ?? null,
|
||||
rateType:
|
||||
hotel.price?.public?.rateType ?? hotel.price?.member?.rateType ?? null,
|
||||
currency:
|
||||
hotel.price?.public?.localPrice.currency ||
|
||||
hotel.price?.member?.localPrice.currency ||
|
||||
currencyValue ||
|
||||
"N/A",
|
||||
images: [
|
||||
hotel.hotelData.hotelContent.images,
|
||||
|
||||
Reference in New Issue
Block a user