From 77c9206a94b360677455fc270517df2feae2cc1c Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Mon, 5 May 2025 16:49:48 +0200 Subject: [PATCH] fix: update BookingWidget type based on if hotelId is specified --- apps/scandic-web/components/Forms/BookingWidget/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/scandic-web/components/Forms/BookingWidget/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/index.tsx index 0821ea0fc..79cf4887e 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/index.tsx @@ -36,7 +36,7 @@ export default function Form({ type, onClose }: BookingWidgetFormProps) { const { handleSubmit, setValue } = useFormContext() function onSubmit(data: BookingWidgetSchema) { - const type = data.city?.length ? "city" : "hotel" + const type = data.city && data.hotel ? "hotel" : "city" const bookingFlowPage = type === "city" ? selectHotel(lang) : selectRate(lang)