Files
web/packages/booking-flow/lib/components/PriceDetailsModal/PriceDetailsTable/Row/Price/Packages.tsx
Joakim Jäderberg 7dee6d5083 Merged in chore/move-enter-details (pull request #2778)
Chore/move enter details

Approved-by: Anton Gunnarsson
2025-09-11 07:16:24 +00:00

34 lines
830 B
TypeScript

"use client"
import { useIntl } from "react-intl"
import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting"
import { getRoomFeatureDescription } from "../../../../../utils/getRoomFeatureDescription"
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={getRoomFeatureDescription(pkg.code, pkg.description, intl)}
value={formatPrice(
intl,
+pkg.localPrice.totalPrice,
pkg.localPrice.currency
)}
/>
))
}