fix(SW-3085): restore missing form id
This commit is contained in:
@@ -12,6 +12,7 @@ import { Typography } from "@scandic-hotels/design-system/Typography"
|
|||||||
|
|
||||||
import { useEnterDetailsStore } from "@/stores/enter-details"
|
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 { isBookingCodeRate } from "@/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/MobileSummary/utils"
|
||||||
import { formatPrice } from "@/utils/numberFormatting"
|
import { formatPrice } from "@/utils/numberFormatting"
|
||||||
|
|
||||||
@@ -20,7 +21,7 @@ import styles from "./bottomSheet.module.css"
|
|||||||
interface SummaryBottomSheetProps
|
interface SummaryBottomSheetProps
|
||||||
extends PropsWithChildren<{
|
extends PropsWithChildren<{
|
||||||
isMember: boolean
|
isMember: boolean
|
||||||
}> { }
|
}> {}
|
||||||
|
|
||||||
export default function SummaryBottomSheet({
|
export default function SummaryBottomSheet({
|
||||||
children,
|
children,
|
||||||
@@ -31,19 +32,14 @@ export default function SummaryBottomSheet({
|
|||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
const errorCode = searchParams.get("errorCode")
|
const errorCode = searchParams.get("errorCode")
|
||||||
|
|
||||||
const {
|
const { isSummaryOpen, toggleSummaryOpen, totalPrice, isSubmitting, rooms } =
|
||||||
isSummaryOpen,
|
useEnterDetailsStore((state) => ({
|
||||||
toggleSummaryOpen,
|
isSummaryOpen: state.isSummaryOpen,
|
||||||
totalPrice,
|
toggleSummaryOpen: state.actions.toggleSummaryOpen,
|
||||||
isSubmitting,
|
totalPrice: state.totalPrice,
|
||||||
rooms,
|
isSubmitting: state.isSubmitting,
|
||||||
} = useEnterDetailsStore((state) => ({
|
rooms: state.rooms,
|
||||||
isSummaryOpen: state.isSummaryOpen,
|
}))
|
||||||
toggleSummaryOpen: state.actions.toggleSummaryOpen,
|
|
||||||
totalPrice: state.totalPrice,
|
|
||||||
isSubmitting: state.isSubmitting,
|
|
||||||
rooms: state.rooms,
|
|
||||||
}))
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isSummaryOpen) {
|
if (isSummaryOpen) {
|
||||||
@@ -140,6 +136,7 @@ export default function SummaryBottomSheet({
|
|||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
isDisabled={isSubmitting}
|
isDisabled={isSubmitting}
|
||||||
isPending={isSubmitting}
|
isPending={isSubmitting}
|
||||||
|
form={formId}
|
||||||
>
|
>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
defaultMessage: "Complete booking",
|
defaultMessage: "Complete booking",
|
||||||
|
|||||||
Reference in New Issue
Block a user