MCPcopy
hub / github.com/umami-software/umami / useLinksQuery

Function useLinksQuery

src/components/hooks/queries/useLinksQuery.ts:6–24  ·  view source on GitHub ↗
(
  { teamId }: { teamId?: string },
  params?: Record<string, any>,
  options?: ReactQueryOptions,
)

Source from the content-addressed store, hash-verified

4import { usePagedQuery } from '../usePagedQuery';
5
6export function useLinksQuery(
7 { teamId }: { teamId?: string },
8 params?: Record<string, any>,
9 options?: ReactQueryOptions,
10) {
11 const { modified } = useModified('links');
12 const { get } = useApi();
13
14 return usePagedQuery({
15 queryKey: ['links', { teamId, modified, ...params }],
16 queryFn: pageParams => {
17 return get(teamId ? `/teams/${teamId}/links` : '/links', {
18 ...pageParams,
19 ...params,
20 });
21 },
22 ...options,
23 });
24}

Callers 2

LinkSelectFunction · 0.90
LinksDataTableFunction · 0.90

Calls 4

useModifiedFunction · 0.90
useApiFunction · 0.90
usePagedQueryFunction · 0.90
getFunction · 0.50

Tested by

no test coverage detected