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:
@@ -54,7 +54,7 @@ export default function BookingWidgetClient({
|
||||
const [originalOverflowY, setOriginalOverflowY] = useState<string | null>(
|
||||
null
|
||||
)
|
||||
const { bookingCodeEnabled } = useBookingFlowConfig()
|
||||
const bookingFlowConfig = useBookingFlowConfig()
|
||||
const storedBookingWidgetState = useBookingWidgetState()
|
||||
|
||||
const shouldFetchAutoComplete = !!data.hotelId || !!data.city
|
||||
@@ -128,7 +128,7 @@ export default function BookingWidgetClient({
|
||||
toDate: toDate.format("YYYY-MM-DD"),
|
||||
},
|
||||
bookingCode: {
|
||||
value: bookingCodeEnabled ? selectedBookingCode : "",
|
||||
value: bookingFlowConfig.bookingCodeEnabled ? selectedBookingCode : "",
|
||||
remember: false,
|
||||
},
|
||||
redemption: data.searchType === SEARCH_TYPE_REDEMPTION,
|
||||
@@ -228,7 +228,7 @@ export default function BookingWidgetClient({
|
||||
}, [data, methods, storedBookingWidgetState])
|
||||
|
||||
if (shouldShowSkeleton) {
|
||||
return <BookingWidgetSkeleton type={type} />
|
||||
return <BookingWidgetSkeleton type={type} config={bookingFlowConfig} />
|
||||
}
|
||||
|
||||
const classNames = bookingWidgetContainerVariants({
|
||||
|
||||
Reference in New Issue
Block a user