fix: align price formatting

This commit is contained in:
Christel Westerberg
2025-01-02 10:54:19 +01:00
parent 4f58784a22
commit 139accb8ed
26 changed files with 198 additions and 193 deletions

View File

@@ -8,7 +8,7 @@ import Preamble from "@/components/TempDesignSystem/Text/Preamble"
import Title from "@/components/TempDesignSystem/Text/Title"
import { getIntl } from "@/i18n"
import { getLang } from "@/i18n/serverContext"
import getSingleDecimal from "@/utils/numberFormatting"
import { getSingleDecimal } from "@/utils/numberFormatting"
import styles from "./introSection.module.css"

View File

@@ -1,5 +1,6 @@
import Body from "@/components/TempDesignSystem/Text/Body"
import { getIntl } from "@/i18n"
import { formatPrice } from "@/utils/numberFormatting"
import styles from "./parkingPrices.module.css"
@@ -42,9 +43,11 @@ export default async function ParkingPrices({
{getPeriod(parking.period)}
</Body>
<Body color="uiTextHighContrast">
{freeParking
? intl.formatMessage({ id: "Free parking" })
: `${parking.amount} ${currency}`}
{parking.amount
? freeParking
? intl.formatMessage({ id: "Free parking" })
: formatPrice(intl, parking.amount, currency)
: "N/A"}
</Body>
</div>
{parking.startTime &&