From 02ced628329545dafc9fb5e388cfc7a0843d49e8 Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Sat, 2 Nov 2024 20:45:31 -0400 Subject: [PATCH] final change --- hooks/store/publicLinks.tsx | 3 +++ yarn.lock | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/store/publicLinks.tsx b/hooks/store/publicLinks.tsx index c59cced..86c7961 100644 --- a/hooks/store/publicLinks.tsx +++ b/hooks/store/publicLinks.tsx @@ -33,12 +33,15 @@ const usePublicLinks = (params: LinkRequestQuery = {}) => { } as LinkRequestQuery; const queryString = buildQueryString(queryParamsObject); + const { data, ...rest } = useFetchLinks(queryString); + const links = useMemo(() => { return data?.pages.reduce((acc, page) => { return [...acc, ...page]; }, []); }, [data]); + return { links, data: { ...data, ...rest }, diff --git a/yarn.lock b/yarn.lock index 9a56a48..d3403a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6521,4 +6521,4 @@ zustand@^4.3.8: resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.3.8.tgz#37113df8e9e1421b0be1b2dca02b49b76210e7c4" integrity sha512-4h28KCkHg5ii/wcFFJ5Fp+k1J3gJoasaIbppdgZFO4BPJnsNxL0mQXBSFgOgAdCdBj35aDTPvdAJReTMntFPGg== dependencies: - use-sync-external-store "1.2.0" \ No newline at end of file + use-sync-external-store "1.2.0"