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:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user