Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit d16d244

Browse files
authored
Merge pull request #448 from topcoder-platform/roles-checkout
Roles checkout - #446
2 parents 6e7fe5a + cdd5d90 commit d16d244

File tree

1 file changed

+3
-1
lines changed
  • src/routes/CreateNewTeam/pages/CreateTaasPayment/PaymentForm

1 file changed

+3
-1
lines changed

src/routes/CreateNewTeam/pages/CreateTaasPayment/PaymentForm/index.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const PaymentForm = ({ calculatedAmount }) => {
5252
const [processing, setProcessing] = useState(false);
5353
const [requestLoading, setRequestLoading] = useState(false);
5454
const [errors, setErrors] = useState({});
55+
const [clicked, setClicked] = useState(true);
5556
const stripe = useStripe();
5657
const elements = useElements();
5758
const dispatch = useDispatch();
@@ -96,7 +97,8 @@ const PaymentForm = ({ calculatedAmount }) => {
9697
};
9798
const handleFormSubmit = async (e) => {
9899
e.preventDefault();
99-
if (formIsValid()) {
100+
if (formIsValid() && clicked) {
101+
setClicked(false);
100102
setProcessing(true);
101103
postTeamPayment({ totalAmount: calculatedAmount })
102104
.then(async (res) => {

0 commit comments

Comments
 (0)