Pixel/links development. New validations folder. More refactoring.

This commit is contained in:
Mike Cao 2025-08-14 23:48:11 -07:00
parent 88639dfe83
commit 247e14646b
136 changed files with 1395 additions and 516 deletions

View file

@ -3,13 +3,15 @@ import { usePagedQuery } from '../usePagedQuery';
import { useModified } from '../useModified';
import { ReactQueryOptions } from '@/lib/types';
export function useLinksQuery({ teamId }: { teamId?: string }, options?: ReactQueryOptions<any>) {
export function useLinksQuery({ teamId }: { teamId?: string }, options?: ReactQueryOptions) {
const { modified } = useModified('links');
const { get } = useApi();
return usePagedQuery({
queryKey: ['links', { teamId, modified }],
queryFn: async () => get(teamId ? `/teams/${teamId}/links` : '/links'),
queryFn: pageParams => {
return get(teamId ? `/teams/${teamId}/links` : '/links', pageParams);
},
...options,
});
}