Feat/SW-431 payment flow * feat(SW-431): Update mock hotel data * feat(SW-431): Added route handler and trpc routes * feat(SW-431): List payment methods and handle booking status and redirection * feat(SW-431): Updated booking page to poll for booking status * feat(SW-431): Updated create booking contract * feat(SW-431): small fix * fix(SW-431): Added intl string and sorted dictionaries * fix(SW-431): Changes from PR * fix(SW-431): fixes from PR * fix(SW-431): add todo comments * fix(SW-431): update schema prop Approved-by: Simon.Emanuelsson
41 lines
1.4 KiB
TypeScript
41 lines
1.4 KiB
TypeScript
import { useIntl } from "react-intl"
|
|
|
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
|
import Title from "@/components/TempDesignSystem/Text/Title"
|
|
|
|
import styles from "./summarySection.module.css"
|
|
|
|
import { SummarySectionProps } from "@/types/components/hotelReservation/bookingConfirmation/bookingConfirmation"
|
|
|
|
export default function SummarySection({ summary }: SummarySectionProps) {
|
|
const intl = useIntl()
|
|
const roomType = `${intl.formatMessage({ id: "Type of room" })}: ${summary.roomType}`
|
|
const bedType = `${intl.formatMessage({ id: "Type of bed" })}: ${summary.bedType}`
|
|
const breakfast = `${intl.formatMessage({ id: "Breakfast" })}: ${summary.breakfast}`
|
|
const flexibility = `${intl.formatMessage({ id: "Flexibility" })}: ${summary.flexibility}`
|
|
|
|
return (
|
|
<section className={styles.section}>
|
|
<Title as="h4" textAlign="center">
|
|
{intl.formatMessage({ id: "Summary" })}
|
|
</Title>
|
|
<Caption className={styles.summary}>
|
|
<span>{roomType}</span>
|
|
<span>1648 SEK</span>
|
|
</Caption>
|
|
<Caption className={styles.summary}>
|
|
<span>{bedType}</span>
|
|
<span>0 SEK</span>
|
|
</Caption>
|
|
<Caption className={styles.summary}>
|
|
<span>{breakfast}</span>
|
|
<span>198 SEK</span>
|
|
</Caption>
|
|
<Caption className={styles.summary}>
|
|
<span>{flexibility}</span>
|
|
<span>200 SEK</span>
|
|
</Caption>
|
|
</section>
|
|
)
|
|
}
|