Files
web/apps/scandic-web/components/HotelReservation/PriceDetailsModal/PriceDetailsTable/Row/Price/Packages.tsx
Bianca Widstam 9f4e2b3c45 Merged in fix/SW-2425-filter-label-lokalise (pull request #2602)
fix(SW-2425): filter description should be translated with lokalise

* fix(SW-2425): filter description should be translated with lokalise


Approved-by: Anton Gunnarsson
2025-08-06 14:09:32 +00:00

34 lines
816 B
TypeScript

"use client"
import { useIntl } from "react-intl"
import { getFeatureDescription } from "@/components/HotelReservation/utils/getRoomFeatureDescription"
import { formatPrice } from "@/utils/numberFormatting"
import RegularRow from "../Regular"
import type { Packages as PackagesType } from "@scandic-hotels/trpc/types/packages"
interface PackagesProps {
packages: PackagesType | null
}
export default function PackagesRow({ packages }: PackagesProps) {
const intl = useIntl()
if (!packages || !packages.length) {
return null
}
return packages?.map((pkg) => (
<RegularRow
key={pkg.code}
label={getFeatureDescription(pkg.code, pkg.description, intl)}
value={formatPrice(
intl,
+pkg.localPrice.totalPrice,
pkg.localPrice.currency
)}
/>
))
}