Merged in chore/booking-flow-cleaning (pull request #3354)
chore: Clean booking-flow * Clean booking-flow * Fix type issue Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -55,17 +55,23 @@ export function getErrorMessage(
|
||||
"Multi-room booking is not available with this booking code.",
|
||||
})
|
||||
case bookingWidgetErrors.MULTIROOM_REWARD_NIGHT_UNAVAILABLE:
|
||||
return variant === "partner-sas"
|
||||
? intl.formatMessage({
|
||||
id: "partnerSas.error.multiroomRewardNightUnavailable",
|
||||
defaultMessage:
|
||||
"Multi-room bookings are not available with EuroBonus points.",
|
||||
})
|
||||
: intl.formatMessage({
|
||||
switch (variant) {
|
||||
case "scandic":
|
||||
return intl.formatMessage({
|
||||
id: "error.multiroomRewardNightUnavailable",
|
||||
defaultMessage:
|
||||
"Multi-room booking is not available with reward night.",
|
||||
})
|
||||
case "partner-sas":
|
||||
return intl.formatMessage({
|
||||
id: "partnerSas.error.multiroomRewardNightUnavailable",
|
||||
defaultMessage:
|
||||
"Multi-room bookings are not available with EuroBonus points.",
|
||||
})
|
||||
default:
|
||||
const _exhaustiveCheck: never = variant
|
||||
throw new Error(`Unknown variant: ${variant}`)
|
||||
}
|
||||
case bookingWidgetErrors.CODE_VOUCHER_REWARD_NIGHT_UNAVAILABLE:
|
||||
return intl.formatMessage({
|
||||
id: "error.codeVoucherRewardNightUnavailable",
|
||||
|
||||
Reference in New Issue
Block a user