feat: SW-1583 City search Map view redemption
This commit is contained in:
@@ -37,6 +37,7 @@ export default function BookingCode() {
|
||||
setValue,
|
||||
formState: { errors },
|
||||
getValues,
|
||||
trigger,
|
||||
} = useFormContext<BookingWidgetSchema>()
|
||||
|
||||
const bookingCode: BookingCodeSchema = getValues("bookingCode")
|
||||
@@ -52,6 +53,12 @@ export default function BookingCode() {
|
||||
|
||||
function updateBookingCodeFormValue(value: string) {
|
||||
setValue("bookingCode.value", value, { shouldValidate: true })
|
||||
if (getValues("redemption")) {
|
||||
setValue("redemption", false)
|
||||
setTimeout(function () {
|
||||
trigger("bookingCode.value")
|
||||
}, 5000)
|
||||
}
|
||||
}
|
||||
|
||||
const closeIfOutside = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user