Add personal dashboard flow and per-component website selection
This introduces a user-scoped dashboard with board-style view/edit pages while keeping it unavailable in team context, and moves website targeting to component config so dashboard components can each select their own website.
This commit is contained in:
1 parent
2633697585
commit
631cc46f7f
73 files changed
+418
-88
No files matched your search
@@ -13,6 +13,7 @@ export * from './context/useWebsite';
|
||||
export * from './queries/useActiveUsersQuery';
|
||||
export * from './queries/useBoardQuery';
|
||||
export * from './queries/useBoardsQuery';
|
||||
export * from './queries/useDashboardQuery';
|
||||
export * from './queries/useDateRangeQuery';
|
||||
export * from './queries/useDeleteQuery';
|
||||
export * from './queries/useEventDataEventsQuery';
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import { keepPreviousData } from '@tanstack/react-query';
|
||||
import type { ReactQueryOptions } from '@/lib/types';
|
||||
import { useApi } from '../useApi';
|
||||
import { useModified } from '../useModified';
|
||||
|
||||
export function useDashboardQuery(options?: ReactQueryOptions) {
|
||||
const { get, useQuery } = useApi();
|
||||
const { modified } = useModified('dashboard');
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['dashboard', { modified }],
|
||||
queryFn: () => get('/dashboard'),
|
||||
placeholderData: keepPreviousData,
|
||||
...options,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user