feat(SW-865): link to booking without validation
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { differenceInCalendarDays, format, isWeekend } from "date-fns"
|
||||
import { Suspense } from "react"
|
||||
|
||||
import { getBookingConfirmation } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import TrackingSDK from "@/components/TrackingSDK"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import Confirmation from "./Confirmation"
|
||||
|
||||
@@ -14,12 +17,11 @@ import {
|
||||
import { CurrencyEnum } from "@/types/enums/currency"
|
||||
|
||||
export default async function BookingConfirmation({
|
||||
bookingConfirmationPromise,
|
||||
lang,
|
||||
confirmationNumber,
|
||||
}: BookingConfirmationProps) {
|
||||
const bookingConfirmation = await bookingConfirmationPromise
|
||||
|
||||
const { booking, hotel, room } = bookingConfirmation
|
||||
const lang = getLang()
|
||||
const { booking, hotel, room } =
|
||||
await getBookingConfirmation(confirmationNumber)
|
||||
|
||||
const arrivalDate = new Date(booking.checkInDate)
|
||||
const departureDate = new Date(booking.checkOutDate)
|
||||
@@ -69,7 +71,7 @@ export default async function BookingConfirmation({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Confirmation bookingConfirmationPromise={bookingConfirmationPromise} />
|
||||
<Confirmation booking={booking} hotel={hotel} room={room} />
|
||||
<Suspense fallback={null}>
|
||||
<TrackingSDK
|
||||
pageData={initialPageTrackingData}
|
||||
|
||||
Reference in New Issue
Block a user