feat(SW-1540): Fetch data from API for MyStay * feat(SW-1540): Fetch data from API for MyStay * feat(SW-1540): Moved myStaySkeleton * feat(SW-1540) used memoized getBookingConfirmation instead Approved-by: Michael Zetterberg Approved-by: Linus Flood
36 lines
1.2 KiB
TypeScript
36 lines
1.2 KiB
TypeScript
import { getBookingConfirmation } from "@/lib/trpc/memoizedRequests"
|
|
|
|
import Divider from "@/components/TempDesignSystem/Divider"
|
|
|
|
import HotelDetails from "../../BookingConfirmation/HotelDetails"
|
|
import PaymentDetails from "../../BookingConfirmation/PaymentDetails"
|
|
import Promos from "../../BookingConfirmation/Promos"
|
|
import Rooms from "../../BookingConfirmation/Rooms"
|
|
import { Ancillaries } from "./Ancillaries"
|
|
import { BookingActions } from "./BookingActions"
|
|
import { Header } from "./Header"
|
|
|
|
import styles from "./myStay.module.css"
|
|
|
|
export async function MyStay({ reservationId }: { reservationId: string }) {
|
|
const { booking, hotel, room } = await getBookingConfirmation(reservationId)
|
|
|
|
return (
|
|
<main className={styles.main}>
|
|
<Header booking={booking} hotel={hotel} />
|
|
<BookingActions />
|
|
<Rooms booking={booking} room={room} />
|
|
<Ancillaries />
|
|
<Divider color="primaryLightSubtle" />
|
|
<PaymentDetails booking={booking} />
|
|
<Divider color="primaryLightSubtle" />
|
|
<HotelDetails hotel={hotel} />
|
|
<Promos
|
|
hotelId={hotel.operaId}
|
|
lastName={booking.guest.lastName}
|
|
confirmationNumber={booking.confirmationNumber}
|
|
/>
|
|
</main>
|
|
)
|
|
}
|