@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.
@@ -17,7 +17,7 @@ import {
17
17
  UsernameModal,
18
18
  WalletAsset,
19
19
  WalletModal
20
- } from "../chunk-I2V4VRQH.mjs";
20
+ } from "../chunk-OEKLKWFJ.mjs";
21
21
  import "../chunk-JX73EY6V.mjs";
22
22
  import "../chunk-UA6XHZHX.mjs";
23
23
  import "../chunk-IZOOVZAD.mjs";
@@ -1785,13 +1785,19 @@ function useContactList(page_size = 10, type = "Friend") {
1785
1785
  limitIdRef.current = lastItem?.limit_id || 0;
1786
1786
  }
1787
1787
  }, [contactQuery.data?.pages]);
1788
- return {
1789
- data: (contactQuery.data?.pages ?? []).reduce(
1788
+ (0, import_react43.useEffect)(() => {
1789
+ console.log("contactQuery.data", contactQuery.data);
1790
+ }, [contactQuery.data]);
1791
+ const data = (0, import_react43.useMemo)(() => {
1792
+ return (contactQuery.data?.pages ?? []).reduce(
1790
1793
  (a, b) => {
1791
1794
  return a.concat(b?.items ?? []);
1792
1795
  },
1793
1796
  []
1794
- ),
1797
+ );
1798
+ }, [contactQuery.data]);
1799
+ return {
1800
+ data,
1795
1801
  totalCount: contactQuery.hasNextPage ? ((0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0,
1796
1802
  loading: contactQuery.isLoading,
1797
1803
  loadingNextPage: contactQuery.isFetchingNextPage,