feat(SW-237): Updated parallel route to the root layout
This commit is contained in:
1
app/[lang]/(live)/@bookingwidget/[...paths]/page.tsx
Normal file
1
app/[lang]/(live)/@bookingwidget/[...paths]/page.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "../page"
|
||||
1
app/[lang]/(live)/@bookingwidget/default.tsx
Normal file
1
app/[lang]/(live)/@bookingwidget/default.tsx
Normal file
@@ -0,0 +1 @@
|
||||
export { default } from "./page"
|
||||
20
app/[lang]/(live)/@bookingwidget/page.tsx
Normal file
20
app/[lang]/(live)/@bookingwidget/page.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { serverClient } from "@/lib/trpc/server"
|
||||
|
||||
import BookingWidget from "@/components/BookingWidget"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
export default async function BookingWidgetPage() {
|
||||
// Get the booking widget show/hide status based on page specific settings
|
||||
const bookingWidgetToggle =
|
||||
await serverClient().contentstack.base.page_settings({
|
||||
lang: getLang(),
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
{bookingWidgetToggle && bookingWidgetToggle.hideBookingWidget ? null : (
|
||||
<BookingWidget />
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user