File tree 1 file changed +3
-1
lines changed
src/routes/CreateNewTeam/pages/CreateTaasPayment/PaymentForm 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ const PaymentForm = ({ calculatedAmount }) => {
52
52
const [ processing , setProcessing ] = useState ( false ) ;
53
53
const [ requestLoading , setRequestLoading ] = useState ( false ) ;
54
54
const [ errors , setErrors ] = useState ( { } ) ;
55
+ const [ clicked , setClicked ] = useState ( true ) ;
55
56
const stripe = useStripe ( ) ;
56
57
const elements = useElements ( ) ;
57
58
const dispatch = useDispatch ( ) ;
@@ -96,7 +97,8 @@ const PaymentForm = ({ calculatedAmount }) => {
96
97
} ;
97
98
const handleFormSubmit = async ( e ) => {
98
99
e . preventDefault ( ) ;
99
- if ( formIsValid ( ) ) {
100
+ if ( formIsValid ( ) && clicked ) {
101
+ setClicked ( false ) ;
100
102
setProcessing ( true ) ;
101
103
postTeamPayment ( { totalAmount : calculatedAmount } )
102
104
. then ( async ( res ) => {
You can’t perform that action at this time.
0 commit comments