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