Files
web/packages/booking-flow/lib/components/BookingConfirmation/PaymentDetails/index.tsx
Joakim Jäderberg aafad9781f Merged in feat/lokalise-rebuild (pull request #2993)
Feat/lokalise rebuild

* chore(lokalise): update translation ids

* chore(lokalise): easier to switch between projects

* chore(lokalise): update translation ids

* .

* .

* .

* .

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* .

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* .

* .

* chore(lokalise): update translation ids

* chore(lokalise): update translation ids

* chore(lokalise): new translations

* merge

* switch to errors for missing id's

* merge

* sync translations


Approved-by: Linus Flood
2025-10-22 11:00:03 +00:00

55 lines
1.5 KiB
TypeScript

"use client"
import { useIntl } from "react-intl"
import SkeletonShimmer from "@scandic-hotels/design-system/SkeletonShimmer"
import { Typography } from "@scandic-hotels/design-system/Typography"
import { useBookingConfirmationStore } from "../../../stores/booking-confirmation"
import styles from "./paymentDetails.module.css"
export function PaymentDetails() {
const intl = useIntl()
const { rooms, formattedTotalCost } = useBookingConfirmationStore(
(state) => ({
rooms: state.rooms,
formattedTotalCost: state.formattedTotalCost,
})
)
const hasAllRoomsLoaded = rooms.every((room) => room)
return (
<div className={styles.details}>
<Typography variant={"Title/Subtitle/md"}>
<h2>
{intl.formatMessage({
id: "bookingConfirmation.paymentDetails",
defaultMessage: "Payment details",
})}
</h2>
</Typography>
<div className={styles.payment}>
{hasAllRoomsLoaded ? (
<Typography variant={"Body/Paragraph/mdRegular"}>
<p>
{intl.formatMessage(
{
id: "bookingConfirmation.totalCost",
defaultMessage: "Total cost: {amount}",
},
{
amount: formattedTotalCost,
}
)}
</p>
</Typography>
) : (
<SkeletonShimmer width={"100%"} />
)}
</div>
</div>
)
}