Feat/SW-1652 confirmation page * feat(SW-1652): handle linkedReservations fetching * fix: add missing translations * feat: add linkedReservation retry functionality * chore: align naming Approved-by: Simon.Emanuelsson
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import { useIntl } from "react-intl"
|
|
|
|
import { useBookingConfirmationStore } from "@/stores/booking-confirmation"
|
|
|
|
import Body from "@/components/TempDesignSystem/Text/Body"
|
|
import Subtitle from "@/components/TempDesignSystem/Text/Subtitle"
|
|
|
|
import Room from "./Room"
|
|
import TotalPrice from "./TotalPrice"
|
|
|
|
import styles from "./receipt.module.css"
|
|
|
|
export default function Receipt() {
|
|
const intl = useIntl()
|
|
const rooms = useBookingConfirmationStore((state) => state.rooms)
|
|
|
|
return (
|
|
<section className={styles.receipt}>
|
|
<Subtitle type="two">
|
|
{intl.formatMessage({ id: "Booking summary" })}
|
|
</Subtitle>
|
|
|
|
{rooms.map((room, idx) => (
|
|
<div key={room ? room.confirmationNumber : `loader-${idx}`}>
|
|
{rooms.length > 1 ? (
|
|
<Body color="uiTextHighContrast" textTransform={"bold"}>
|
|
{intl.formatMessage(
|
|
{ id: "Room {roomIndex}" },
|
|
{ roomIndex: idx + 1 }
|
|
)}
|
|
</Body>
|
|
) : null}
|
|
<Room roomIndex={idx} />
|
|
</div>
|
|
))}
|
|
|
|
<TotalPrice />
|
|
</section>
|
|
)
|
|
}
|