@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.
@@ -12,7 +12,7 @@ import {
12
12
  useTransaction,
13
13
  useUserInfo,
14
14
  useWallet
15
- } from "../chunk-I2V4VRQH.mjs";
15
+ } from "../chunk-OEKLKWFJ.mjs";
16
16
  import "../chunk-JX73EY6V.mjs";
17
17
  import "../chunk-UA6XHZHX.mjs";
18
18
  import "../chunk-IZOOVZAD.mjs";
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
- return {
6735
- data: (contactQuery.data?.pages ?? []).reduce(
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,