fix: booking widget locking scroll
This commit is contained in:
@@ -177,7 +177,7 @@ export default function BookingWidgetClient({
|
||||
>
|
||||
<CloseLargeIcon />
|
||||
</button>
|
||||
<Form locations={locations} type={type} setIsOpen={setIsOpen} />
|
||||
<Form locations={locations} type={type} onClose={closeMobileSearch} />
|
||||
</div>
|
||||
</section>
|
||||
<div className={styles.backdrop} onClick={closeMobileSearch} />
|
||||
|
||||
@@ -20,7 +20,7 @@ const formId = "booking-widget"
|
||||
export default function Form({
|
||||
locations,
|
||||
type,
|
||||
setIsOpen,
|
||||
onClose,
|
||||
}: BookingWidgetFormProps) {
|
||||
const router = useRouter()
|
||||
const lang = useLang()
|
||||
@@ -56,7 +56,7 @@ export default function Form({
|
||||
)
|
||||
})
|
||||
})
|
||||
setIsOpen(false)
|
||||
onClose()
|
||||
router.push(`${bookingFlowPage}?${bookingWidgetParams.toString()}`)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import type { Location, Locations } from "@/types/trpc/routers/hotel/locations"
|
||||
export interface BookingWidgetFormProps {
|
||||
locations: Locations
|
||||
type?: BookingWidgetType
|
||||
setIsOpen: (isOpen: boolean) => void
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
export interface BookingWidgetFormContentProps {
|
||||
|
||||
Reference in New Issue
Block a user