fix: SW-981 Rounded to single decimal as current web

This commit is contained in:
Hrishikesh Vaipurkar
2024-11-22 18:51:11 +01:00
parent bd6fd62d5c
commit 21f9719050
6 changed files with 26 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ import Body from "@/components/TempDesignSystem/Text/Body"
import Caption from "@/components/TempDesignSystem/Text/Caption"
import Title from "@/components/TempDesignSystem/Text/Title"
import { getIntl } from "@/i18n"
import getSingleDecimal from "@/utils/numberFormatting"
import styles from "./page.module.css"
@@ -47,7 +48,11 @@ export default async function HotelHeader({
<Caption color="textMediumContrast">
{intl.formatMessage(
{ id: "Distance in km to city centre" },
{ number: hotel.location.distanceToCentre / 1000 }
{
number: getSingleDecimal(
hotel.location.distanceToCentre / 1000
),
}
)}
</Caption>
</address>