Merged in fix/SW-2887-complete-booking-button-always-enabled (pull request #2227)

fix(SW-2887): don't disable the booking button
The complete button shouldn’t be disabled based on validation. This was already correct in desktop, but now it’s also correct in mobile.

* fix(SW-2887): don't disable the booking button


Approved-by: Tobias Johansson
Approved-by: Christian Andolf
This commit is contained in:
Niclas Edenvin
2025-05-28 08:11:29 +00:00
parent 76e377d5d5
commit 1d733c5ca3
4 changed files with 9 additions and 39 deletions

View File

@@ -21,19 +21,13 @@ export default function SummaryBottomSheet({ children }: PropsWithChildren) {
const searchParams = useSearchParams()
const errorCode = searchParams.get("errorCode")
const {
isSummaryOpen,
toggleSummaryOpen,
totalPrice,
isSubmittingDisabled,
isSubmitting,
} = useEnterDetailsStore((state) => ({
isSummaryOpen: state.isSummaryOpen,
toggleSummaryOpen: state.actions.toggleSummaryOpen,
totalPrice: state.totalPrice,
isSubmittingDisabled: state.isSubmittingDisabled,
isSubmitting: state.isSubmitting,
}))
const { isSummaryOpen, toggleSummaryOpen, totalPrice, isSubmitting } =
useEnterDetailsStore((state) => ({
isSummaryOpen: state.isSummaryOpen,
toggleSummaryOpen: state.actions.toggleSummaryOpen,
totalPrice: state.totalPrice,
isSubmitting: state.isSubmitting,
}))
useEffect(() => {
if (isSummaryOpen) {
@@ -92,7 +86,7 @@ export default function SummaryBottomSheet({ children }: PropsWithChildren) {
variant="Primary"
size="Large"
type="submit"
isDisabled={isSubmittingDisabled}
isDisabled={isSubmitting}
isPending={isSubmitting}
typography="Body/Supporting text (caption)/smBold"
form={formId}