final change

This commit is contained in:
daniel31x13 2024-11-02 20:45:31 -04:00
parent 4febe1ace5
commit 02ced62832
2 changed files with 4 additions and 1 deletions

View File

@ -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 },