@betterstore/react 0.3.76 → 0.3.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs.js
CHANGED
|
@@ -35471,7 +35471,7 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
|
|
|
35471
35471
|
!paymentSecretPromiseRef.current) {
|
|
35472
35472
|
paymentSecretPromiseRef.current = generatePaymentSecret();
|
|
35473
35473
|
}
|
|
35474
|
-
}, [
|
|
35474
|
+
}, [paymentSecret]);
|
|
35475
35475
|
const renderStep = () => {
|
|
35476
35476
|
if (step === "payment" && formData.customer && formData.shipping) {
|
|
35477
35477
|
return (React.createElement(PaymentForm, { locale: locale, fonts: fonts, checkoutAppearance: checkoutAppearance, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, onBack: handleBack, onDoubleBack: handleDoubleBack, contactEmail: formData.customer.email, shippingAddress: formatAddress(formData.customer.address), shippingName: formData.shipping.name, shippingPrice: storeHelpers.formatPrice(formData.shipping.price, currency, exchangeRate), publicKey: publicKey }));
|
|
@@ -35806,7 +35806,9 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
|
35806
35806
|
});
|
|
35807
35807
|
React.useEffect(() => {
|
|
35808
35808
|
const interval = setTimeout(() => {
|
|
35809
|
-
|
|
35809
|
+
if (step !== "payment") {
|
|
35810
|
+
revalidateDiscounts();
|
|
35811
|
+
}
|
|
35810
35812
|
}, 1000 * 5);
|
|
35811
35813
|
return () => clearInterval(interval);
|
|
35812
35814
|
}, []);
|
package/dist/index.mjs
CHANGED
|
@@ -35451,7 +35451,7 @@ function CheckoutForm({ storeClient, checkoutId, onSuccess, onError, cancelUrl,
|
|
|
35451
35451
|
!paymentSecretPromiseRef.current) {
|
|
35452
35452
|
paymentSecretPromiseRef.current = generatePaymentSecret();
|
|
35453
35453
|
}
|
|
35454
|
-
}, [
|
|
35454
|
+
}, [paymentSecret]);
|
|
35455
35455
|
const renderStep = () => {
|
|
35456
35456
|
if (step === "payment" && formData.customer && formData.shipping) {
|
|
35457
35457
|
return (React__default.createElement(PaymentForm, { locale: locale, fonts: fonts, checkoutAppearance: checkoutAppearance, paymentSecret: paymentSecret, onSuccess: onSuccess, onError: onError, onBack: handleBack, onDoubleBack: handleDoubleBack, contactEmail: formData.customer.email, shippingAddress: formatAddress(formData.customer.address), shippingName: formData.shipping.name, shippingPrice: storeHelpers.formatPrice(formData.shipping.price, currency, exchangeRate), publicKey: publicKey }));
|
|
@@ -35786,7 +35786,9 @@ function CheckoutEmbedComponent({ checkoutId, config }) {
|
|
|
35786
35786
|
});
|
|
35787
35787
|
useEffect(() => {
|
|
35788
35788
|
const interval = setTimeout(() => {
|
|
35789
|
-
|
|
35789
|
+
if (step !== "payment") {
|
|
35790
|
+
revalidateDiscounts();
|
|
35791
|
+
}
|
|
35790
35792
|
}, 1000 * 5);
|
|
35791
35793
|
return () => clearInterval(interval);
|
|
35792
35794
|
}, []);
|