From 284ce90b1767524dbada3d2fb49f7d0ace7010fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Gr=C3=BCneberg?= Date: Tue, 20 Dec 2022 14:32:16 +0100 Subject: [PATCH] move captcha outside of modal --- .../AddNewPaymentMethodModal.tsx | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/studio/components/interfaces/Billing/AddNewPaymentMethodModal/AddNewPaymentMethodModal.tsx b/studio/components/interfaces/Billing/AddNewPaymentMethodModal/AddNewPaymentMethodModal.tsx index 0883d871175..065027c7847 100644 --- a/studio/components/interfaces/Billing/AddNewPaymentMethodModal/AddNewPaymentMethodModal.tsx +++ b/studio/components/interfaces/Billing/AddNewPaymentMethodModal/AddNewPaymentMethodModal.tsx @@ -94,14 +94,9 @@ const AddNewPaymentMethodModal: FC = ({ visible, returnUrl, onCancel }) = } return ( - + // We cant display the hCaptcha in the modal, as the modal auto-closes when clicking the captcha + // So we only show the modal if the captcha has been executed successfully (intent loaded) + <> = ({ visible, returnUrl, onCancel }) = setCaptchaToken(null) }} /> -
- {intent !== undefined ? ( + + +
- ) : ( -
- -
- )} -
-
+
+
+ ) }