@storepecker/storefront-core 2.2.1 → 2.2.2
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.cjs +5 -1
- package/dist/hooks/index.d.cts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +5 -1
- package/package.json +1 -1
package/dist/hooks/index.cjs
CHANGED
|
@@ -78,7 +78,11 @@ var useOrders = (filters) => {
|
|
|
78
78
|
const [data, setData] = react.useState(void 0);
|
|
79
79
|
const [error, setError] = react.useState(null);
|
|
80
80
|
const [isLoading, setIsLoading] = react.useState(true);
|
|
81
|
-
const queryString = new URLSearchParams(
|
|
81
|
+
const queryString = new URLSearchParams(
|
|
82
|
+
Object.fromEntries(
|
|
83
|
+
Object.entries(filters).map(([k, v]) => [k, String(v)])
|
|
84
|
+
)
|
|
85
|
+
).toString();
|
|
82
86
|
const fetchData = react.useCallback(async () => {
|
|
83
87
|
try {
|
|
84
88
|
setIsLoading(true);
|
package/dist/hooks/index.d.cts
CHANGED
|
@@ -24,7 +24,7 @@ declare const useCart: (addressId?: number) => {
|
|
|
24
24
|
setData: React.Dispatch<React.SetStateAction<Cart.Root | undefined>>;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
declare const useOrders: (filters: Record<string,
|
|
27
|
+
declare const useOrders: (filters: Record<string, any>) => {
|
|
28
28
|
data: Order.OrderResponse | undefined;
|
|
29
29
|
error: unknown;
|
|
30
30
|
isLoading: boolean;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare const useCart: (addressId?: number) => {
|
|
|
24
24
|
setData: React.Dispatch<React.SetStateAction<Cart.Root | undefined>>;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
declare const useOrders: (filters: Record<string,
|
|
27
|
+
declare const useOrders: (filters: Record<string, any>) => {
|
|
28
28
|
data: Order.OrderResponse | undefined;
|
|
29
29
|
error: unknown;
|
|
30
30
|
isLoading: boolean;
|
package/dist/hooks/index.js
CHANGED
|
@@ -76,7 +76,11 @@ var useOrders = (filters) => {
|
|
|
76
76
|
const [data, setData] = useState(void 0);
|
|
77
77
|
const [error, setError] = useState(null);
|
|
78
78
|
const [isLoading, setIsLoading] = useState(true);
|
|
79
|
-
const queryString = new URLSearchParams(
|
|
79
|
+
const queryString = new URLSearchParams(
|
|
80
|
+
Object.fromEntries(
|
|
81
|
+
Object.entries(filters).map(([k, v]) => [k, String(v)])
|
|
82
|
+
)
|
|
83
|
+
).toString();
|
|
80
84
|
const fetchData = useCallback(async () => {
|
|
81
85
|
try {
|
|
82
86
|
setIsLoading(true);
|