@pelcro/react-pelcro-js 4.0.0-alpha.87 → 4.0.0-alpha.89
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/dist/index.cjs.js +21 -2
- package/dist/index.esm.js +21 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -30658,7 +30658,8 @@ const AddressCreateModal = ({
|
|
|
30658
30658
|
resetView,
|
|
30659
30659
|
giftRecipient,
|
|
30660
30660
|
product,
|
|
30661
|
-
plan
|
|
30661
|
+
plan,
|
|
30662
|
+
order
|
|
30662
30663
|
} = usePelcro();
|
|
30663
30664
|
const {
|
|
30664
30665
|
t
|
|
@@ -30686,7 +30687,7 @@ const AddressCreateModal = ({
|
|
|
30686
30687
|
resetView();
|
|
30687
30688
|
};
|
|
30688
30689
|
|
|
30689
|
-
const showBackButton = Boolean(product && plan && !giftRecipient);
|
|
30690
|
+
const showBackButton = Boolean(product && plan && !giftRecipient || order);
|
|
30690
30691
|
|
|
30691
30692
|
const userHasAddress = () => {
|
|
30692
30693
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
@@ -30695,6 +30696,7 @@ const AddressCreateModal = ({
|
|
|
30695
30696
|
return addresses.length > 0;
|
|
30696
30697
|
};
|
|
30697
30698
|
|
|
30699
|
+
const view = window.Pelcro.helpers.getURLParameter("view");
|
|
30698
30700
|
const isUserHasAddress = userHasAddress();
|
|
30699
30701
|
|
|
30700
30702
|
const goBack = () => {
|
|
@@ -30702,9 +30704,21 @@ const AddressCreateModal = ({
|
|
|
30702
30704
|
return switchView("address-select");
|
|
30703
30705
|
}
|
|
30704
30706
|
|
|
30707
|
+
if (order && isUserHasAddress) {
|
|
30708
|
+
return switchView("address-select");
|
|
30709
|
+
}
|
|
30710
|
+
|
|
30711
|
+
if (product && plan && view == "offer") {
|
|
30712
|
+
return switchView("offer");
|
|
30713
|
+
}
|
|
30714
|
+
|
|
30705
30715
|
if (product && plan) {
|
|
30706
30716
|
return switchView("plan-select");
|
|
30707
30717
|
}
|
|
30718
|
+
|
|
30719
|
+
if (order) {
|
|
30720
|
+
return switchView("cart");
|
|
30721
|
+
}
|
|
30708
30722
|
};
|
|
30709
30723
|
|
|
30710
30724
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
@@ -34322,8 +34336,13 @@ const AddressSelectModal = ({
|
|
|
34322
34336
|
};
|
|
34323
34337
|
|
|
34324
34338
|
const showBackButton = Boolean(product && plan && !giftRecipient || order);
|
|
34339
|
+
const view = window.Pelcro.helpers.getURLParameter("view");
|
|
34325
34340
|
|
|
34326
34341
|
const goBack = () => {
|
|
34342
|
+
if (product && plan && view == "offer") {
|
|
34343
|
+
return switchView("offer");
|
|
34344
|
+
}
|
|
34345
|
+
|
|
34327
34346
|
if (product && plan) {
|
|
34328
34347
|
return switchView("plan-select");
|
|
34329
34348
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -30628,7 +30628,8 @@ const AddressCreateModal = ({
|
|
|
30628
30628
|
resetView,
|
|
30629
30629
|
giftRecipient,
|
|
30630
30630
|
product,
|
|
30631
|
-
plan
|
|
30631
|
+
plan,
|
|
30632
|
+
order
|
|
30632
30633
|
} = usePelcro();
|
|
30633
30634
|
const {
|
|
30634
30635
|
t
|
|
@@ -30656,7 +30657,7 @@ const AddressCreateModal = ({
|
|
|
30656
30657
|
resetView();
|
|
30657
30658
|
};
|
|
30658
30659
|
|
|
30659
|
-
const showBackButton = Boolean(product && plan && !giftRecipient);
|
|
30660
|
+
const showBackButton = Boolean(product && plan && !giftRecipient || order);
|
|
30660
30661
|
|
|
30661
30662
|
const userHasAddress = () => {
|
|
30662
30663
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2;
|
|
@@ -30665,6 +30666,7 @@ const AddressCreateModal = ({
|
|
|
30665
30666
|
return addresses.length > 0;
|
|
30666
30667
|
};
|
|
30667
30668
|
|
|
30669
|
+
const view = window.Pelcro.helpers.getURLParameter("view");
|
|
30668
30670
|
const isUserHasAddress = userHasAddress();
|
|
30669
30671
|
|
|
30670
30672
|
const goBack = () => {
|
|
@@ -30672,9 +30674,21 @@ const AddressCreateModal = ({
|
|
|
30672
30674
|
return switchView("address-select");
|
|
30673
30675
|
}
|
|
30674
30676
|
|
|
30677
|
+
if (order && isUserHasAddress) {
|
|
30678
|
+
return switchView("address-select");
|
|
30679
|
+
}
|
|
30680
|
+
|
|
30681
|
+
if (product && plan && view == "offer") {
|
|
30682
|
+
return switchView("offer");
|
|
30683
|
+
}
|
|
30684
|
+
|
|
30675
30685
|
if (product && plan) {
|
|
30676
30686
|
return switchView("plan-select");
|
|
30677
30687
|
}
|
|
30688
|
+
|
|
30689
|
+
if (order) {
|
|
30690
|
+
return switchView("cart");
|
|
30691
|
+
}
|
|
30678
30692
|
};
|
|
30679
30693
|
|
|
30680
30694
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
@@ -34292,8 +34306,13 @@ const AddressSelectModal = ({
|
|
|
34292
34306
|
};
|
|
34293
34307
|
|
|
34294
34308
|
const showBackButton = Boolean(product && plan && !giftRecipient || order);
|
|
34309
|
+
const view = window.Pelcro.helpers.getURLParameter("view");
|
|
34295
34310
|
|
|
34296
34311
|
const goBack = () => {
|
|
34312
|
+
if (product && plan && view == "offer") {
|
|
34313
|
+
return switchView("offer");
|
|
34314
|
+
}
|
|
34315
|
+
|
|
34297
34316
|
if (product && plan) {
|
|
34298
34317
|
return switchView("plan-select");
|
|
34299
34318
|
}
|