@anker-in/shopify-react 0.1.1-beta.12 → 0.1.1-beta.13
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/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +6 -4
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +6 -4
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/{index-BOsx-Rx3.d.ts → index-C77lIEQZ.d.ts} +2 -2
- package/dist/{index-D5VVTzBT.d.mts → index-CO_fgrFV.d.mts} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/dist/provider/index.d.mts +1 -1
- package/dist/provider/index.d.ts +1 -1
- package/dist/provider/index.js +1 -1
- package/dist/provider/index.js.map +1 -1
- package/dist/provider/index.mjs +1 -1
- package/dist/provider/index.mjs.map +1 -1
- package/dist/{types-CUv-lzQk.d.mts → types-DpxtE_nv.d.mts} +1 -4
- package/dist/{types-CUv-lzQk.d.ts → types-DpxtE_nv.d.ts} +1 -4
- package/package.json +5 -5
package/dist/hooks/index.mjs
CHANGED
|
@@ -2565,9 +2565,9 @@ function useUpdateCartDeliveryOptions(mutate, metafieldIdentifiers, options) {
|
|
|
2565
2565
|
// src/hooks/member/plus/use-update-plus-member-delivery-options.ts
|
|
2566
2566
|
var useUpdatePlusMemberDeliveryOptions = ({
|
|
2567
2567
|
options
|
|
2568
|
-
}) => {
|
|
2568
|
+
} = {}) => {
|
|
2569
2569
|
const { cart: cartContextData, mutateCart, metafieldIdentifiers } = useCartContext();
|
|
2570
|
-
const { trigger: updateCartDeliveryOptions2
|
|
2570
|
+
const { trigger: updateCartDeliveryOptions2 } = useUpdateCartDeliveryOptions(
|
|
2571
2571
|
mutateCart,
|
|
2572
2572
|
metafieldIdentifiers
|
|
2573
2573
|
);
|
|
@@ -2577,11 +2577,13 @@ var useUpdatePlusMemberDeliveryOptions = ({
|
|
|
2577
2577
|
const { deliveryData } = arg;
|
|
2578
2578
|
const firstDeliveryGroup = currentCart?.deliveryGroups?.[0];
|
|
2579
2579
|
const deliveryGroupId = firstDeliveryGroup?.id;
|
|
2580
|
-
const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option
|
|
2580
|
+
const selectedOptionCode = deliveryData?.deliveryCustomData?.selected_delivery_option;
|
|
2581
2581
|
if (!deliveryGroupId || !selectedOptionCode || selectedOptionCode === firstDeliveryGroup?.selectedDeliveryOption?.code) {
|
|
2582
2582
|
return null;
|
|
2583
2583
|
}
|
|
2584
|
-
const deliveryGroup = currentCart?.deliveryGroups?.find(
|
|
2584
|
+
const deliveryGroup = currentCart?.deliveryGroups?.find(
|
|
2585
|
+
(group) => group?.id === deliveryGroupId
|
|
2586
|
+
);
|
|
2585
2587
|
const matchedOption = deliveryGroup?.deliveryOptions?.find(
|
|
2586
2588
|
(option) => option?.code === selectedOptionCode
|
|
2587
2589
|
);
|