Skip to content

Commit

Permalink
Disable Pay Now when submitting
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNeshi committed Jan 15, 2024
1 parent 82c2b88 commit e87942d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default function Checkout({ onBack }: { onBack: () => void }) {
const { handleError } = useErrorContext();

const [isLoading, setLoading] = useState(true);
const [isSubmitting, setSubmitting] = useState(true);
const [isSubmitting, setSubmitting] = useState(false);

const handleSubmit: FormEventHandler<HTMLFormElement> = async (e) => {
e.preventDefault();
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function Checkout({ onBack }: { onBack: () => void }) {
</button>
<button
className="btn-orange btn-donate"
disabled={!stripe || !elements}
disabled={!stripe || !elements || isSubmitting}
type="submit"
>
<LoadText text="Processing..." isLoading={isSubmitting}>
Expand Down

0 comments on commit e87942d

Please sign in to comment.