Merged in chore/move-bookingwidget-to-parallel-route (pull request #2738)
chore: Render partner-sas BookingWidget in parallel route * Render BookingWidget in parallel route Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -0,0 +1 @@
|
||||
export { default } from "../page"
|
||||
@@ -0,0 +1,11 @@
|
||||
import { BookingWidgetSkeleton } from "@scandic-hotels/booking-flow/BookingWidget/Skeleton"
|
||||
|
||||
// This file is crucial for displaying a loading
|
||||
// state immediately in the booking flow.
|
||||
// Next doesn't recognize manually added Suspense
|
||||
// boundaries during page navigation (Server->Client)
|
||||
// thus making it seem as the page is frozen during
|
||||
// the time it takes for `BookingWidget` to resolve.
|
||||
export default function BookingWidgetLoading() {
|
||||
return <BookingWidgetSkeleton />
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "../page"
|
||||
@@ -0,0 +1,3 @@
|
||||
export default function ConfirmedBookingSlot() {
|
||||
return null
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export { default } from "../page"
|
||||
@@ -0,0 +1,3 @@
|
||||
export default function ConfirmedBookingSlot() {
|
||||
return null
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
.container {
|
||||
height: 76px;
|
||||
width: 100%;
|
||||
}
|
||||
16
apps/partner-sas/app/[lang]/@bookingwidget/page.tsx
Normal file
16
apps/partner-sas/app/[lang]/@bookingwidget/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { BookingWidget } from "@scandic-hotels/booking-flow/BookingWidget"
|
||||
import { parseBookingWidgetSearchParams } from "@scandic-hotels/booking-flow/utils/url"
|
||||
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
import type { LangParams, PageArgs } from "@/types/params"
|
||||
|
||||
export default async function BookingWidgetPage(props: PageArgs<LangParams>) {
|
||||
const searchParams = await props.searchParams
|
||||
|
||||
const booking = parseBookingWidgetSearchParams(searchParams)
|
||||
|
||||
const lang = await getLang()
|
||||
|
||||
return <BookingWidget booking={booking} lang={lang} />
|
||||
}
|
||||
Reference in New Issue
Block a user