Skip to content

Commit

Permalink
fix: initializespaymentRequest on project change
Browse files Browse the repository at this point in the history
- `paymentRequest` initialized on initial render of `PaymentRequestCustomButton`
  • Loading branch information
mohitb35 committed Jan 8, 2024
1 parent 2d16d70 commit 057c639
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Donations/PaymentMethods/PaymentRequestCustomButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ export const PaymentRequestCustomButton = ({
const [canMakePayment, setCanMakePayment] = useState(false);

Check notice on line 51 in src/Donations/PaymentMethods/PaymentRequestCustomButton.tsx

View check run for this annotation

codefactor.io / CodeFactor

src/Donations/PaymentMethods/PaymentRequestCustomButton.tsx#L34-L51

Complex Method
const [paymentLoading, setPaymentLoading] = useState(false);

useEffect(()=> {
setPaymentRequest(null);
},[])

useEffect(() => {
if (
stripe &&
Expand Down

0 comments on commit 057c639

Please sign in to comment.