@matchain/matchid-sdk-react 0.1.53-alpha.13 → 0.1.53-alpha.14
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-I2V4VRQH.mjs → chunk-OEKLKWFJ.mjs} +11 -5
- package/dist/{chunk-I2V4VRQH.mjs.map → chunk-OEKLKWFJ.mjs.map} +1 -1
- package/dist/components/index.js +9 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.js +9 -3
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/hooks/index.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -6731,13 +6731,19 @@ function useContactList(page_size = 10, type = "Friend") {
|
|
|
6731
6731
|
limitIdRef.current = lastItem?.limit_id || 0;
|
|
6732
6732
|
}
|
|
6733
6733
|
}, [contactQuery.data?.pages]);
|
|
6734
|
-
|
|
6735
|
-
data
|
|
6734
|
+
(0, import_react34.useEffect)(() => {
|
|
6735
|
+
console.log("contactQuery.data", contactQuery.data);
|
|
6736
|
+
}, [contactQuery.data]);
|
|
6737
|
+
const data = (0, import_react34.useMemo)(() => {
|
|
6738
|
+
return (contactQuery.data?.pages ?? []).reduce(
|
|
6736
6739
|
(a, b) => {
|
|
6737
6740
|
return a.concat(b?.items ?? []);
|
|
6738
6741
|
},
|
|
6739
6742
|
[]
|
|
6740
|
-
)
|
|
6743
|
+
);
|
|
6744
|
+
}, [contactQuery.data]);
|
|
6745
|
+
return {
|
|
6746
|
+
data,
|
|
6741
6747
|
totalCount: contactQuery.hasNextPage ? ((0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0,
|
|
6742
6748
|
loading: contactQuery.isLoading,
|
|
6743
6749
|
loadingNextPage: contactQuery.isFetchingNextPage,
|