From 59745dc61a79d6314d4ec66200b480c17ea2dd20 Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Thu, 19 Jun 2025 13:25:24 +0200 Subject: [PATCH] fix(SW-3085): restore missing form id --- .../Summary/Mobile/BottomSheet/index.tsx | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/index.tsx index e66547283..17515d4f3 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/Mobile/BottomSheet/index.tsx @@ -12,6 +12,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography" import { useEnterDetailsStore } from "@/stores/enter-details" +import { formId } from "@/components/HotelReservation/EnterDetails/Payment/PaymentClient" import { isBookingCodeRate } from "@/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/utils" import { formatPrice } from "@/utils/numberFormatting" @@ -20,7 +21,7 @@ import styles from "./bottomSheet.module.css" interface SummaryBottomSheetProps extends PropsWithChildren<{ isMember: boolean - }> { } + }> {} export default function SummaryBottomSheet({ children, @@ -31,19 +32,14 @@ export default function SummaryBottomSheet({ const searchParams = useSearchParams() const errorCode = searchParams.get("errorCode") - const { - isSummaryOpen, - toggleSummaryOpen, - totalPrice, - isSubmitting, - rooms, - } = useEnterDetailsStore((state) => ({ - isSummaryOpen: state.isSummaryOpen, - toggleSummaryOpen: state.actions.toggleSummaryOpen, - totalPrice: state.totalPrice, - isSubmitting: state.isSubmitting, - rooms: state.rooms, - })) + const { isSummaryOpen, toggleSummaryOpen, totalPrice, isSubmitting, rooms } = + useEnterDetailsStore((state) => ({ + isSummaryOpen: state.isSummaryOpen, + toggleSummaryOpen: state.actions.toggleSummaryOpen, + totalPrice: state.totalPrice, + isSubmitting: state.isSubmitting, + rooms: state.rooms, + })) useEffect(() => { if (isSummaryOpen) { @@ -140,6 +136,7 @@ export default function SummaryBottomSheet({ typography="Body/Paragraph/mdBold" isDisabled={isSubmitting} isPending={isSubmitting} + form={formId} > {intl.formatMessage({ defaultMessage: "Complete booking",