fix: clean up dictionaries
This commit is contained in:
@@ -13,6 +13,8 @@ import type { AncillaryCardProps } from "@/types/components/ancillaryCard"
|
||||
export function AncillaryCard({ ancillary }: AncillaryCardProps) {
|
||||
const intl = useIntl()
|
||||
|
||||
const priceMsg = `${formatPrice(intl, ancillary.price.total, ancillary.price.currency)} ${ancillary.price.text ?? ""}`
|
||||
|
||||
return (
|
||||
<article className={styles.ancillaryCard}>
|
||||
<div className={styles.imageContainer}>
|
||||
@@ -34,11 +36,7 @@ export function AncillaryCard({ ancillary }: AncillaryCardProps) {
|
||||
<Body color="uiTextHighContrast">
|
||||
{ancillary.price.included
|
||||
? intl.formatMessage({ id: "Included" })
|
||||
: `${formatPrice(
|
||||
intl,
|
||||
ancillary.price.total,
|
||||
ancillary.price.currency
|
||||
)} ${ancillary.price.text ?? ""}`}
|
||||
: priceMsg}
|
||||
</Body>
|
||||
|
||||
{ancillary.points && (
|
||||
@@ -47,7 +45,12 @@ export function AncillaryCard({ ancillary }: AncillaryCardProps) {
|
||||
<Divider variant="vertical" color="subtle" />
|
||||
</div>
|
||||
<Body textAlign="right" color="uiTextHighContrast">
|
||||
{ancillary.points} {intl.formatMessage({ id: "Points" })}
|
||||
{intl.formatMessage(
|
||||
{ id: "{value} points" },
|
||||
{
|
||||
value: ancillary.points,
|
||||
}
|
||||
)}
|
||||
</Body>
|
||||
</>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user