fix(SW-690): use correct naming of search params in booking

Approved-by: Bianca Widstam
Approved-by: Linus Flood
This commit is contained in:
Niclas Edenvin
2024-10-24 08:49:06 +00:00
parent 748021cdab
commit 8d490e14f2
8 changed files with 36 additions and 31 deletions

View File

@@ -27,7 +27,7 @@ export default function FormContent({
const rooms = intl.formatMessage({ id: "Guests & Rooms" })
const nights = dt(selectedDate.to).diff(dt(selectedDate.from), "days")
const nights = dt(selectedDate.toDate).diff(dt(selectedDate.fromDate), "days")
return (
<>

View File

@@ -18,8 +18,8 @@ export const bookingWidgetSchema = z.object({
bookingCode: z.string(), // Update this as required when working with booking codes component
date: z.object({
// Update this as required once started working with Date picker in Nights component
from: z.string(),
to: z.string(),
fromDate: z.string(),
toDate: z.string(),
}),
location: z.string().refine(
(value) => {