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:
@@ -106,10 +106,6 @@ export default function PaymentClient({
|
||||
return room.mustBeGuaranteed
|
||||
})
|
||||
|
||||
const setIsSubmittingDisabled = useEnterDetailsStore(
|
||||
(state) => state.actions.setIsSubmittingDisabled
|
||||
)
|
||||
|
||||
const [refId, setRefId] = useState("")
|
||||
const [isPollingForBookingStatus, setIsPollingForBookingStatus] =
|
||||
useState(false)
|
||||
@@ -284,16 +280,6 @@ export default function PaymentClient({
|
||||
handlePaymentError,
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
setIsSubmittingDisabled(
|
||||
!methods.formState.isValid || methods.formState.isSubmitting
|
||||
)
|
||||
}, [
|
||||
methods.formState.isValid,
|
||||
methods.formState.isSubmitting,
|
||||
setIsSubmittingDisabled,
|
||||
])
|
||||
|
||||
const getPaymentMethod = useCallback(
|
||||
(paymentMethod: string | null | undefined): PaymentMethodEnum => {
|
||||
if (hasFlexRates) {
|
||||
@@ -626,7 +612,7 @@ export default function PaymentClient({
|
||||
<div className={styles.submitButton}>
|
||||
<Button
|
||||
type="submit"
|
||||
isDisabled={methods.formState.isSubmitting}
|
||||
isDisabled={isSubmitting}
|
||||
isPending={isSubmitting}
|
||||
typography="Body/Supporting text (caption)/smBold"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user