Remove setPaymentIsReady method
This commit is contained in:
@@ -12,9 +12,8 @@ import Email from './email'
|
|||||||
|
|
||||||
const PAYPAL_ID = process.env.NEXT_PUBLIC_PAYPAL_DONATE_ID
|
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 () => {
|
const cancelPayment = async () => {
|
||||||
setPaymentIsReady(false)
|
|
||||||
setClientEmail('')
|
setClientEmail('')
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
setClientSecret(null)
|
setClientSecret(null)
|
||||||
@@ -72,7 +71,6 @@ export default function Don({isPaypal, selectedMontant, setSelectedMontant, vali
|
|||||||
setClientSecret={setClientSecret}
|
setClientSecret={setClientSecret}
|
||||||
setPaymentIntent={setPaymentIntent}
|
setPaymentIntent={setPaymentIntent}
|
||||||
setIsLoading={setIsLoading}
|
setIsLoading={setIsLoading}
|
||||||
setPaymentIsReady={setPaymentIsReady}
|
|
||||||
setClientEmail={setClientEmail}
|
setClientEmail={setClientEmail}
|
||||||
/>
|
/>
|
||||||
<Stack justifyContent='center' sx={{marginTop: 3}} direction={{xs: 'column', sm: 'row'}} spacing={{xs: 1, sm: 2, md: 4}}>
|
<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,
|
setClientSecret: PropTypes.func.isRequired,
|
||||||
setPaymentIntent: PropTypes.func.isRequired,
|
setPaymentIntent: PropTypes.func.isRequired,
|
||||||
setIsLoading: PropTypes.func.isRequired,
|
setIsLoading: PropTypes.func.isRequired,
|
||||||
setPaymentIsReady: PropTypes.func.isRequired,
|
|
||||||
setClientEmail: PropTypes.func.isRequired,
|
setClientEmail: PropTypes.func.isRequired,
|
||||||
clientEmail: PropTypes.string,
|
clientEmail: PropTypes.string,
|
||||||
error: PropTypes.string,
|
error: PropTypes.string,
|
||||||
|
|||||||
@@ -12,9 +12,8 @@ import {validateEmail} from '../../lib/utils/emails'
|
|||||||
import Email from './email'
|
import Email from './email'
|
||||||
import Montant from './montant'
|
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 () => {
|
const cancelPayment = async () => {
|
||||||
setPaymentIsReady(false)
|
|
||||||
setClientEmail('')
|
setClientEmail('')
|
||||||
setIsLoading(false)
|
setIsLoading(false)
|
||||||
setClientSecret(null)
|
setClientSecret(null)
|
||||||
@@ -65,7 +64,6 @@ export default function StripePayment({isLoading, selectedMontant, setSelectedMo
|
|||||||
setClientSecret={setClientSecret}
|
setClientSecret={setClientSecret}
|
||||||
setPaymentIntent={setPaymentIntent}
|
setPaymentIntent={setPaymentIntent}
|
||||||
setIsLoading={setIsLoading}
|
setIsLoading={setIsLoading}
|
||||||
setPaymentIsReady={setPaymentIsReady}
|
|
||||||
setClientEmail={setClientEmail}
|
setClientEmail={setClientEmail}
|
||||||
/>
|
/>
|
||||||
<Typography sx={{marginTop: 1}} variant='caption' component='div'><i>* Obligatoire</i></Typography>
|
<Typography sx={{marginTop: 1}} variant='caption' component='div'><i>* Obligatoire</i></Typography>
|
||||||
@@ -109,7 +107,6 @@ StripePayment.propTypes = {
|
|||||||
setClientSecret: PropTypes.func.isRequired,
|
setClientSecret: PropTypes.func.isRequired,
|
||||||
setPaymentIntent: PropTypes.func.isRequired,
|
setPaymentIntent: PropTypes.func.isRequired,
|
||||||
setIsLoading: PropTypes.func.isRequired,
|
setIsLoading: PropTypes.func.isRequired,
|
||||||
setPaymentIsReady: PropTypes.func.isRequired,
|
|
||||||
setClientEmail: PropTypes.func.isRequired,
|
setClientEmail: PropTypes.func.isRequired,
|
||||||
clientEmail: PropTypes.string,
|
clientEmail: PropTypes.string,
|
||||||
error: PropTypes.string,
|
error: PropTypes.string,
|
||||||
|
|||||||
Reference in New Issue
Block a user