fix: avoid localizing currencies and default missing value to N/A

This commit is contained in:
Christel Westerberg
2025-01-07 15:48:44 +01:00
parent 5018cba623
commit a3331850a2
12 changed files with 22 additions and 68 deletions

View File

@@ -16,7 +16,6 @@ import {
type TrackingSDKPageData,
type TrackingSDKPaymentInfo,
} from "@/types/components/tracking"
import { CurrencyEnum } from "@/types/enums/currency"
export default async function BookingConfirmation({
confirmationNumber,
@@ -60,7 +59,7 @@ export default async function BookingConfirmation({
rateCodeName: booking.rateDefinition.rateCode ?? undefined,
rateCodeCancellationRule:
booking.rateDefinition?.cancellationText ?? undefined,
revenueCurrencyCode: CurrencyEnum[booking.currencyCode],
revenueCurrencyCode: booking.currencyCode,
breakfastOption: booking.rateDefinition.breakfastIncluded
? "breakfast buffet"
: "no breakfast",

View File

@@ -15,7 +15,7 @@ export function getHotelPins(hotels: HotelData[]): HotelPin[] {
currency:
hotel.price?.public?.localPrice.currency ||
hotel.price?.member?.localPrice.currency ||
null,
"N/A",
images: [
hotel.hotelData.hotelContent.images,
...(hotel.hotelData.gallery?.heroImages ?? []),