Add dialog to card payment

This commit is contained in:
2022-06-21 19:45:39 +04:00
parent cd87d8b4e5
commit 19179849a2
4 changed files with 127 additions and 40 deletions
-18
View File
@@ -27,14 +27,9 @@ export default function Soutyen({prices, paymentStatus}) {
const [success, setSuccess] = useState(null)
const [error, setError] = useState(null)
const [open, setOpen] = useState(false)
const [payementIsReady, setPaymentIsReady] = useState(false)
const [isLoading, setIsLoading] = useState(false)
const [clientEmail, setClientEmail] = useState('')
const scrollToBottom = () => {
scrollEvent.current?.scrollIntoView({behavior: 'smooth', block: 'end', inline: 'nearest'})
}
useEffect(() => {
const getClientSecret = async () => {
try {
@@ -118,18 +113,6 @@ export default function Soutyen({prices, paymentStatus}) {
useEffect(() => {}, [router.query.payment_intent])
useEffect(() => {
if (validMontant) {
scrollToBottom()
}
}, [validMontant])
useEffect(() => {
if (payementIsReady) {
scrollToBottom()
}
}, [payementIsReady])
return (
<HeadLayout
title='Soutenir Organisation KA Internationale !'
@@ -162,7 +145,6 @@ export default function Soutyen({prices, paymentStatus}) {
setClientSecret={setClientSecret}
setPaymentIntent={setPaymentIntent}
setIsLoading={setIsLoading}
setPaymentIsReady={setPaymentIsReady}
error={error}
setError={setError}
clientEmail={clientEmail}