@timardex/cluemart-shared 2.0.0 → 2.0.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/{chunk-JJQL6LZE.mjs → chunk-D45RNLV2.mjs} +1 -1
- package/dist/chunk-D45RNLV2.mjs.map +1 -0
- package/dist/{chunk-XPUYQ7GB.mjs → chunk-GRP7XQNB.mjs} +11 -7
- package/dist/{chunk-XPUYQ7GB.mjs.map → chunk-GRP7XQNB.mjs.map} +1 -1
- package/dist/{chunk-L3SNS6OJ.mjs → chunk-XED54CPG.mjs} +2 -2
- package/dist/formFields/index.mjs +2 -2
- package/dist/graphql/index.cjs +9 -5
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.d.mts +1 -1
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +3 -3
- package/dist/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +10 -6
- package/dist/index.mjs.map +1 -1
- package/dist/{resourceActivities-BvejCLh9.d.mts → resourceActivities-BJAI4jf-.d.mts} +1 -1
- package/dist/{resourceActivities-Smsl03Je.d.ts → resourceActivities-BW648M1v.d.ts} +1 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/utils/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-JJQL6LZE.mjs.map +0 -1
- /package/dist/{chunk-L3SNS6OJ.mjs.map → chunk-XED54CPG.mjs.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
PROMO_CODE_PREFIX,
|
|
12
12
|
gameScreenIdentifierList
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-D45RNLV2.mjs";
|
|
14
14
|
import {
|
|
15
15
|
isTransientNetworkError
|
|
16
16
|
} from "./chunk-RAYUJODN.mjs";
|
|
@@ -1780,4 +1780,4 @@ export {
|
|
|
1780
1780
|
toUserFacingErrorMessage,
|
|
1781
1781
|
getErrorMessage
|
|
1782
1782
|
};
|
|
1783
|
-
//# sourceMappingURL=chunk-
|
|
1783
|
+
//# sourceMappingURL=chunk-XED54CPG.mjs.map
|
|
@@ -46,9 +46,9 @@ import {
|
|
|
46
46
|
import {
|
|
47
47
|
availableCategories,
|
|
48
48
|
categoryColors
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-XED54CPG.mjs";
|
|
50
50
|
import "../chunk-YRO6KEZG.mjs";
|
|
51
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-D45RNLV2.mjs";
|
|
52
52
|
import "../chunk-RAYUJODN.mjs";
|
|
53
53
|
import "../chunk-DQ7ZHIXW.mjs";
|
|
54
54
|
import "../chunk-7DQBUZXY.mjs";
|
package/dist/graphql/index.cjs
CHANGED
|
@@ -5327,6 +5327,10 @@ function usePaginatedList({
|
|
|
5327
5327
|
skip,
|
|
5328
5328
|
variables: { ...variables, options: { limit: pageSize + 1, offset } }
|
|
5329
5329
|
});
|
|
5330
|
+
const refetchRef = (0, import_react.useRef)(refetch);
|
|
5331
|
+
refetchRef.current = refetch;
|
|
5332
|
+
const variablesRef = (0, import_react.useRef)(variables);
|
|
5333
|
+
variablesRef.current = variables;
|
|
5330
5334
|
const rawPage = getItems(data);
|
|
5331
5335
|
const page = rawPage.length > pageSize ? rawPage.slice(0, pageSize) : rawPage;
|
|
5332
5336
|
const hasMorePage = rawPage.length > pageSize;
|
|
@@ -5351,7 +5355,7 @@ function usePaginatedList({
|
|
|
5351
5355
|
return;
|
|
5352
5356
|
}
|
|
5353
5357
|
if (error) {
|
|
5354
|
-
void
|
|
5358
|
+
void refetchRef.current();
|
|
5355
5359
|
return;
|
|
5356
5360
|
}
|
|
5357
5361
|
if (!hasSettled) {
|
|
@@ -5361,7 +5365,7 @@ function usePaginatedList({
|
|
|
5361
5365
|
return;
|
|
5362
5366
|
}
|
|
5363
5367
|
setOffset(offset + pageSize);
|
|
5364
|
-
}, [loading, skip, error, hasSettled, hasMore, offset, pageSize
|
|
5368
|
+
}, [loading, skip, error, hasSettled, hasMore, offset, pageSize]);
|
|
5365
5369
|
const refresh = (0, import_react.useCallback)(() => {
|
|
5366
5370
|
setItems([]);
|
|
5367
5371
|
setHasMore(!skip);
|
|
@@ -5370,11 +5374,11 @@ function usePaginatedList({
|
|
|
5370
5374
|
if (skip) {
|
|
5371
5375
|
return Promise.resolve();
|
|
5372
5376
|
}
|
|
5373
|
-
return
|
|
5374
|
-
...
|
|
5377
|
+
return refetchRef.current({
|
|
5378
|
+
...variablesRef.current,
|
|
5375
5379
|
options: { limit: pageSize + 1, offset: 0 }
|
|
5376
5380
|
});
|
|
5377
|
-
}, [
|
|
5381
|
+
}, [pageSize, skip]);
|
|
5378
5382
|
return {
|
|
5379
5383
|
error,
|
|
5380
5384
|
hasMore,
|