diff --git a/components/BookingWidget/Client.tsx b/components/BookingWidget/Client.tsx
index 930cad4c0..0c7ef1b88 100644
--- a/components/BookingWidget/Client.tsx
+++ b/components/BookingWidget/Client.tsx
@@ -173,7 +173,7 @@ export default function BookingWidgetClient({
>
-
+
diff --git a/components/Forms/BookingWidget/index.tsx b/components/Forms/BookingWidget/index.tsx
index 6c78ea341..243fceaa5 100644
--- a/components/Forms/BookingWidget/index.tsx
+++ b/components/Forms/BookingWidget/index.tsx
@@ -17,7 +17,11 @@ import { Location } from "@/types/trpc/routers/hotel/locations"
const formId = "booking-widget"
-export default function Form({ locations, type }: BookingWidgetFormProps) {
+export default function Form({
+ locations,
+ type,
+ setIsOpen,
+}: BookingWidgetFormProps) {
const router = useRouter()
const lang = useLang()
@@ -52,7 +56,7 @@ export default function Form({ locations, type }: BookingWidgetFormProps) {
)
})
})
-
+ setIsOpen(false)
router.push(`${bookingFlowPage}?${bookingWidgetParams.toString()}`)
}
diff --git a/types/components/form/bookingwidget.ts b/types/components/form/bookingwidget.ts
index 14a548952..887c4eae2 100644
--- a/types/components/form/bookingwidget.ts
+++ b/types/components/form/bookingwidget.ts
@@ -1,14 +1,10 @@
-import { FormState, UseFormReturn } from "react-hook-form"
-
-import type {
- BookingWidgetSchema,
- BookingWidgetType,
-} from "@/types/components/bookingWidget"
+import type { BookingWidgetType } from "@/types/components/bookingWidget"
import type { Location, Locations } from "@/types/trpc/routers/hotel/locations"
export interface BookingWidgetFormProps {
locations: Locations
type?: BookingWidgetType
+ setIsOpen: (isOpen: boolean) => void
}
export interface BookingWidgetFormContentProps {