Merged in fix/SW-3021-vouchers (pull request #2719)
fix(SW-3021): add pluralization support for vouchers * fix(SW-3021): add pluralization support for vouchers Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { cx } from "class-variance-authority"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { CurrencyEnum } from "@scandic-hotels/common/constants/currency"
|
||||
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
|
||||
@@ -21,14 +20,11 @@ export default function LargeRow({
|
||||
price,
|
||||
}: RowProps) {
|
||||
const intl = useIntl()
|
||||
const isVoucherRate = price.local.currency === CurrencyEnum.Voucher
|
||||
const currency = isVoucherRate
|
||||
? intl.formatMessage({ defaultMessage: "Voucher" })
|
||||
: price.local.currency
|
||||
|
||||
const totalPrice = formatPrice(
|
||||
intl,
|
||||
price.local.price,
|
||||
currency,
|
||||
price.local.currency,
|
||||
price.local.additionalPrice,
|
||||
price.local.additionalPriceCurrency
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user