(
{ teamId }: { teamId?: string },
params?: Record<string, any>,
options?: ReactQueryOptions,
)
| 4 | import { usePagedQuery } from '../usePagedQuery'; |
| 5 | |
| 6 | export 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 | } |
no test coverage detected