feat(SW-1523): foundation for my stay page * feat(SW-1523): foundation for my stay page This is the base page for the my stay page. It is very much hard coded and all components need to get a design update afterwards. But this is to get the page going! * fix(i18n): messages Approved-by: Michael Zetterberg Approved-by: Christian Andolf
32 lines
804 B
TypeScript
32 lines
804 B
TypeScript
import Title from "@/components/TempDesignSystem/Text/Title"
|
|
import { getIntl } from "@/i18n"
|
|
|
|
import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"
|
|
|
|
export async function Header({
|
|
booking,
|
|
hotel,
|
|
}: Pick<BookingConfirmation, "booking" | "hotel">) {
|
|
const intl = await getIntl()
|
|
return (
|
|
<header>
|
|
<Title as="h2" color="red">
|
|
{intl.formatMessage(
|
|
{ id: "My stay at {hotelName}" },
|
|
{
|
|
hotelName: hotel.name,
|
|
}
|
|
)}
|
|
</Title>
|
|
<Title as="h3" level="h2" textTransform="regular">
|
|
{intl.formatMessage(
|
|
{ id: "Reservation No. {reservationNumber}" },
|
|
{
|
|
reservationNumber: booking.confirmationNumber,
|
|
}
|
|
)}
|
|
</Title>
|
|
</header>
|
|
)
|
|
}
|