ingeniuscliq-core 0.3.9 → 0.3.10
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './index.css';var Bh = Object.defineProperty;
|
|
1
|
+
import './index-C25q5vF8-1761141940862.css';var Bh = Object.defineProperty;
|
|
2
2
|
var Wh = (e, t, n) => t in e ? Bh(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var Se = (e, t, n) => Wh(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import Hh from "i18next";
|
|
@@ -2479,33 +2479,20 @@ class X5 {
|
|
|
2479
2479
|
throw console.error(a), t((s) => ({ ...s, error: a, loading: !1 })), a;
|
|
2480
2480
|
}
|
|
2481
2481
|
},
|
|
2482
|
-
removeFromCart: (r) => {
|
|
2482
|
+
removeFromCart: async (r) => {
|
|
2483
2483
|
try {
|
|
2484
|
-
t({ loading: !0, error: null }), this.shopCartService.removeFromCart(r);
|
|
2485
|
-
|
|
2486
|
-
o
|
|
2487
|
-
(a) => ({
|
|
2488
|
-
cart: {
|
|
2489
|
-
...a.cart,
|
|
2490
|
-
items: [
|
|
2491
|
-
...a.cart.items,
|
|
2492
|
-
{ ...o, quantity: o.quantity - 1 }
|
|
2493
|
-
]
|
|
2494
|
-
},
|
|
2495
|
-
cartItems: [
|
|
2496
|
-
...a.cartItems,
|
|
2497
|
-
{ ...o, quantity: o.quantity - 1 }
|
|
2498
|
-
],
|
|
2499
|
-
loading: !1
|
|
2500
|
-
})
|
|
2501
|
-
);
|
|
2484
|
+
t({ loading: !0, error: null }), await this.shopCartService.removeFromCart(r);
|
|
2485
|
+
let o = await this.shopCartService.getCart();
|
|
2486
|
+
t(() => ({ cart: o.data.data, cartItems: o.data.data.items, loading: !1 }));
|
|
2502
2487
|
} catch (o) {
|
|
2503
2488
|
throw console.error(o), t((a) => ({ ...a, error: o, loading: !1 })), o;
|
|
2504
2489
|
}
|
|
2505
2490
|
},
|
|
2506
|
-
removeItemFromCart: (r) => {
|
|
2491
|
+
removeItemFromCart: async (r) => {
|
|
2507
2492
|
try {
|
|
2508
|
-
t({ loading: !0, error: null }), this.shopCartService.removeItemFromCart(r)
|
|
2493
|
+
t({ loading: !0, error: null }), await this.shopCartService.removeItemFromCart(r);
|
|
2494
|
+
let o = await this.shopCartService.getCart();
|
|
2495
|
+
t(() => ({ cart: o.data.data, cartItems: o.data.data.items, loading: !1 }));
|
|
2509
2496
|
} catch (o) {
|
|
2510
2497
|
throw console.error(o), t((a) => ({ ...a, error: o, loading: !1 })), o;
|
|
2511
2498
|
}
|
package/package.json
CHANGED
|
File without changes
|