fix: booking widget locking scroll

This commit is contained in:
Christel Westerberg
2024-11-18 15:04:37 +01:00
parent 4c9e9de113
commit 9094b08345
3 changed files with 4 additions and 4 deletions

View File

@@ -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} />

View File

@@ -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()}`)
}

View File

@@ -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 {