Merged in fix/sw-3551-rsc-bookingflowconfig (pull request #2988)
fix(SW-3551): Fix issue with BookingConfigProvider in RSC * wip move config to pages * Move config providing to pages
This commit is contained in:
@@ -1,30 +1,34 @@
|
||||
"use client"
|
||||
|
||||
import { BookingFlowConfigContextProvider } from "../../bookingFlowConfig/bookingFlowConfigContext"
|
||||
import { BookingWidgetFormSkeleton } from "./BookingWidgetForm"
|
||||
import { MobileToggleButtonSkeleton } from "./MobileToggleButton"
|
||||
import { bookingWidgetContainerVariants } from "./variant"
|
||||
|
||||
import styles from "./bookingWidget.module.css"
|
||||
|
||||
import type { BookingFlowConfig } from "../../bookingFlowConfig/bookingFlowConfig"
|
||||
import type { BookingWidgetClientProps } from "./Client"
|
||||
|
||||
export function BookingWidgetSkeleton({
|
||||
type = "full",
|
||||
config,
|
||||
}: {
|
||||
type?: BookingWidgetClientProps["type"]
|
||||
config: BookingFlowConfig
|
||||
}) {
|
||||
const classNames = bookingWidgetContainerVariants({
|
||||
type,
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
<BookingFlowConfigContextProvider config={config}>
|
||||
<section className={classNames} style={{ top: 0 }}>
|
||||
<MobileToggleButtonSkeleton />
|
||||
<div className={styles.formContainer}>
|
||||
<BookingWidgetFormSkeleton type={type} />
|
||||
</div>
|
||||
</section>
|
||||
</>
|
||||
</BookingFlowConfigContextProvider>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user