@matchain/matchid-sdk-react 0.1.53-alpha.13 → 0.1.53-alpha.15

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.
@@ -2020,7 +2020,7 @@ var import_react10 = require("react");
2020
2020
  var import_viem4 = require("viem");
2021
2021
 
2022
2022
  // src/context/ModalContext.tsx
2023
- var import_react9 = require("react");
2023
+ var import_react9 = __toESM(require("react"));
2024
2024
  var import_react_dom = require("react-dom");
2025
2025
 
2026
2026
  // src/ui/Drawer/index.tsx
@@ -6516,13 +6516,19 @@ function useContactList(page_size = 10, type = "Friend") {
6516
6516
  limitIdRef.current = lastItem?.limit_id || 0;
6517
6517
  }
6518
6518
  }, [contactQuery.data?.pages]);
6519
- return {
6520
- data: (contactQuery.data?.pages ?? []).reduce(
6519
+ (0, import_react42.useEffect)(() => {
6520
+ console.log("contactQuery.data", contactQuery.data);
6521
+ }, [contactQuery.data]);
6522
+ const data = (0, import_react42.useMemo)(() => {
6523
+ return (contactQuery.data?.pages ?? []).reduce(
6521
6524
  (a, b) => {
6522
6525
  return a.concat(b?.items ?? []);
6523
6526
  },
6524
6527
  []
6525
- ),
6528
+ );
6529
+ }, [contactQuery.data]);
6530
+ return {
6531
+ data,
6526
6532
  totalCount: contactQuery.hasNextPage ? ((0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0) + 1 : (0, import_last.default)(contactQuery.data?.pages ?? [])?.meta.total ?? 0,
6527
6533
  loading: contactQuery.isLoading,
6528
6534
  loadingNextPage: contactQuery.isFetchingNextPage,