Add link and pixel selectors to top nav

This commit is contained in:
Mike Cao committed 2026-02-12 17:01:37 -08:00
1 parent dd2d6bca45
commit a1f3ad89f6
6 files changed
+255 -17

No files matched your search

+10 -3
View File
@@ -3,14 +3,21 @@ import { useApi } from '../useApi';
import { useModified } from '../useModified';
import { usePagedQuery } from '../usePagedQuery';
export function usePixelsQuery({ teamId }: { teamId?: string }, options?: ReactQueryOptions) {
export function usePixelsQuery(
{ teamId }: { teamId?: string },
params?: Record<string, any>,
options?: ReactQueryOptions,
) {
const { modified } = useModified('pixels');
const { get } = useApi();
return usePagedQuery({
queryKey: ['pixels', { teamId, modified }],
queryKey: ['pixels', { teamId, modified, ...params }],
queryFn: pageParams => {
return get(teamId ? `/teams/${teamId}/pixels` : '/pixels', pageParams);
return get(teamId ? `/teams/${teamId}/pixels` : '/pixels', {
...pageParams,
...params,
});
},
...options,
});