Skip to content

Commit

Permalink
added prettier, amount update in stripe element
Browse files Browse the repository at this point in the history
  • Loading branch information
tejassonar committed Dec 13, 2021
1 parent d26ff29 commit 3c64693
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
bracketSpacing: true,
};
12 changes: 5 additions & 7 deletions src/Donations/PaymentMethods/PaymentRequestCustomButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export const PaymentRequestCustomButton = ({
requestPayerEmail: true,
});
// Check the availability of the Payment Request API.
pr.canMakePayment().then(result => {
pr.canMakePayment().then((result) => {
if (result) {
setPaymentRequest(pr);
}
});
}
}, [stripe, paymentRequest]);
}, [stripe, paymentRequest, country, currency, amount]);

useEffect(() => {
if (stripe && paymentRequest) {
Expand Down Expand Up @@ -116,7 +116,6 @@ export const PaymentRequestCustomButton = ({
};
}, [paymentRequest, onPaymentFunction]);


return ready ? (
<div
className="d-flex column"
Expand Down Expand Up @@ -158,10 +157,9 @@ export const PaymentRequestCustomButton = ({
) : paymentRequest._canMakePaymentAvailability.GOOGLE_PAY ? (
<div className="w-100">
<button
onClick={() =>{
paymentRequest.show()
}
}
onClick={() => {
paymentRequest.show();
}}
className={`${
isPaymentPage
? "donate-small"
Expand Down

0 comments on commit 3c64693

Please sign in to comment.