Remove setPaymentIsReady method

This commit is contained in:
2022-07-07 19:42:38 +04:00
parent 4012d780e3
commit e1b9e0a8d6
2 changed files with 2 additions and 8 deletions
+1 -4
View File
@@ -12,9 +12,8 @@ import Email from './email'
const PAYPAL_ID = process.env.NEXT_PUBLIC_PAYPAL_DONATE_ID
export default function Don({isPaypal, selectedMontant, setSelectedMontant, validMontant, setValidMontant, prices, paymentIntent, setClientSecret, setPaymentIntent, setIsLoading, setPaymentIsReady, setClientEmail, clientEmail, error, setError}) {
export default function Don({isPaypal, selectedMontant, setSelectedMontant, validMontant, setValidMontant, prices, paymentIntent, setClientSecret, setPaymentIntent, setIsLoading, setClientEmail, clientEmail, error, setError}) {
const cancelPayment = async () => {
setPaymentIsReady(false)
setClientEmail('')
setIsLoading(false)
setClientSecret(null)
@@ -72,7 +71,6 @@ export default function Don({isPaypal, selectedMontant, setSelectedMontant, vali
setClientSecret={setClientSecret}
setPaymentIntent={setPaymentIntent}
setIsLoading={setIsLoading}
setPaymentIsReady={setPaymentIsReady}
setClientEmail={setClientEmail}
/>
<Stack justifyContent='center' sx={{marginTop: 3}} direction={{xs: 'column', sm: 'row'}} spacing={{xs: 1, sm: 2, md: 4}}>
@@ -111,7 +109,6 @@ Don.propTypes = {
setClientSecret: PropTypes.func.isRequired,
setPaymentIntent: PropTypes.func.isRequired,
setIsLoading: PropTypes.func.isRequired,
setPaymentIsReady: PropTypes.func.isRequired,
setClientEmail: PropTypes.func.isRequired,
clientEmail: PropTypes.string,
error: PropTypes.string,
+1 -4
View File
@@ -12,9 +12,8 @@ import {validateEmail} from '../../lib/utils/emails'
import Email from './email'
import Montant from './montant'
export default function StripePayment({isLoading, selectedMontant, setSelectedMontant, validMontant, setValidMontant, prices, paymentIntent, setClientSecret, setPaymentIntent, setIsLoading, setPaymentIsReady, setClientEmail, clientEmail, error, setError}) {
export default function StripePayment({isLoading, selectedMontant, setSelectedMontant, validMontant, setValidMontant, prices, paymentIntent, setClientSecret, setPaymentIntent, setIsLoading, setClientEmail, clientEmail, error, setError}) {
const cancelPayment = async () => {
setPaymentIsReady(false)
setClientEmail('')
setIsLoading(false)
setClientSecret(null)
@@ -65,7 +64,6 @@ export default function StripePayment({isLoading, selectedMontant, setSelectedMo
setClientSecret={setClientSecret}
setPaymentIntent={setPaymentIntent}
setIsLoading={setIsLoading}
setPaymentIsReady={setPaymentIsReady}
setClientEmail={setClientEmail}
/>
<Typography sx={{marginTop: 1}} variant='caption' component='div'><i>* Obligatoire</i></Typography>
@@ -109,7 +107,6 @@ StripePayment.propTypes = {
setClientSecret: PropTypes.func.isRequired,
setPaymentIntent: PropTypes.func.isRequired,
setIsLoading: PropTypes.func.isRequired,
setPaymentIsReady: PropTypes.func.isRequired,
setClientEmail: PropTypes.func.isRequired,
clientEmail: PropTypes.string,
error: PropTypes.string,