Add board selector to top navigation

This commit is contained in:
Mike Cao committed 2026-02-12 17:26:52 -08:00
1 parent a1f3ad89f6
commit e2b391af28
5 files changed
+128 -6

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 useBoardsQuery({ teamId }: { teamId?: string }, options?: ReactQueryOptions) {
export function useBoardsQuery(
{ teamId }: { teamId?: string },
params?: Record<string, any>,
options?: ReactQueryOptions,
) {
const { modified } = useModified('boards');
const { get } = useApi();
return usePagedQuery({
queryKey: ['boards', { teamId, modified }],
queryKey: ['boards', { teamId, modified, ...params }],
queryFn: pageParams => {
return get(teamId ? `/teams/${teamId}/boards` : '/boards', pageParams);
return get(teamId ? `/teams/${teamId}/boards` : '/boards', {
...pageParams,
...params,
});
},
...options,
});