From 4fbc290fd6da2980792e90afc1157ed08f6aad55 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Tue, 17 Sep 2024 16:10:04 +0530 Subject: [PATCH 1/3] fix: chunk loading issue - 1 --- src/PaymentElementRenderer.resi | 8 +++++++- src/PaymentElementRendererLazy.res | 1 - src/RenderPaymentMethods.res | 10 +--------- 3 files changed, 8 insertions(+), 11 deletions(-) delete mode 100644 src/PaymentElementRendererLazy.res diff --git a/src/PaymentElementRenderer.resi b/src/PaymentElementRenderer.resi index a52c10213..7b549bfc5 100644 --- a/src/PaymentElementRenderer.resi +++ b/src/PaymentElementRenderer.resi @@ -1,7 +1,13 @@ @react.component -let default: ( +let make: ( ~paymentType: CardThemeType.mode, ~cardProps: CardUtils.cardProps, ~expiryProps: CardUtils.expiryProps, ~cvcProps: CardUtils.cvcProps, ) => React.element +let default: props< + CardThemeType.mode, + CardUtils.cardProps, + CardUtils.expiryProps, + CardUtils.cvcProps, +> => React.element diff --git a/src/PaymentElementRendererLazy.res b/src/PaymentElementRendererLazy.res deleted file mode 100644 index 233aafa9d..000000000 --- a/src/PaymentElementRendererLazy.res +++ /dev/null @@ -1 +0,0 @@ -let make = React.lazy_(() => Js.import(PaymentElementRenderer.default)) diff --git a/src/RenderPaymentMethods.res b/src/RenderPaymentMethods.res index d2def612a..e7f746dd3 100644 --- a/src/RenderPaymentMethods.res +++ b/src/RenderPaymentMethods.res @@ -87,15 +87,7 @@ let make = ( | KlarnaElement | ExpressCheckoutElement | Payment => - - {paymentType->Utils.getIsWalletElementPaymentType - ? - : } - } - componentName="PaymentElementRendererLazy"> - - + | CardNumberElement => Date: Tue, 17 Sep 2024 16:26:57 +0530 Subject: [PATCH 2/3] fix: comments addressed --- src/RenderPaymentMethods.res | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/RenderPaymentMethods.res b/src/RenderPaymentMethods.res index e7f746dd3..842e77d7b 100644 --- a/src/RenderPaymentMethods.res +++ b/src/RenderPaymentMethods.res @@ -87,7 +87,15 @@ let make = ( | KlarnaElement | ExpressCheckoutElement | Payment => - + + {paymentType->Utils.getIsWalletElementPaymentType + ? + : } + } + componentName="PaymentElementRenderer"> + + | CardNumberElement => Date: Tue, 17 Sep 2024 16:29:37 +0530 Subject: [PATCH 3/3] fix: comments addressed --- src/PaymentElementRenderer.res | 2 -- src/PaymentElementRenderer.resi | 6 ------ 2 files changed, 8 deletions(-) diff --git a/src/PaymentElementRenderer.res b/src/PaymentElementRenderer.res index 1bc1a9f82..0a8cef4f3 100644 --- a/src/PaymentElementRenderer.res +++ b/src/PaymentElementRenderer.res @@ -25,5 +25,3 @@ let make = ( : } } - -let default = make diff --git a/src/PaymentElementRenderer.resi b/src/PaymentElementRenderer.resi index 7b549bfc5..c91ffa89a 100644 --- a/src/PaymentElementRenderer.resi +++ b/src/PaymentElementRenderer.resi @@ -5,9 +5,3 @@ let make: ( ~expiryProps: CardUtils.expiryProps, ~cvcProps: CardUtils.cvcProps, ) => React.element -let default: props< - CardThemeType.mode, - CardUtils.cardProps, - CardUtils.expiryProps, - CardUtils.cvcProps, -> => React.element