Go to select hotel when booking widget submits
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
"use client"
|
||||
import { zodResolver } from "@hookform/resolvers/zod"
|
||||
import { useRouter } from "next/navigation"
|
||||
import { FormProvider, useForm } from "react-hook-form"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
@@ -19,6 +20,7 @@ const formId = "booking-widget"
|
||||
|
||||
export default function Form() {
|
||||
const intl = useIntl()
|
||||
const router = useRouter()
|
||||
const methods = useForm<BookingWidgetSchema>({
|
||||
defaultValues: {
|
||||
search: {
|
||||
@@ -48,8 +50,9 @@ export default function Form() {
|
||||
|
||||
function onSubmit(data: BookingWidgetSchema) {
|
||||
console.log(data)
|
||||
// Parse data and route accordignly to Select hotel or select room-rate page
|
||||
// TODO: Parse data and route accordignly to Select hotel or select room-rate page
|
||||
console.log("to be routing")
|
||||
router.push("/en/hotelreservation/select-hotel")
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user