Add board share management UI
This commit is contained in:
1 parent
b429e7b24d
commit
c4226bc63d
30 files changed
+565
-56
No files matched your search
@@ -12,6 +12,7 @@ export * from './context/useWebsite';
|
||||
// Query hooks
|
||||
export * from './queries/useActiveUsersQuery';
|
||||
export * from './queries/useBoardQuery';
|
||||
export * from './queries/useBoardSharesQuery';
|
||||
export * from './queries/useBoardsQuery';
|
||||
export * from './queries/useDashboardQuery';
|
||||
export * from './queries/useDateRangeQuery';
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import type { ReactQueryOptions } from '@/lib/types';
|
||||
import { useApi } from '../useApi';
|
||||
import { useModified } from '../useModified';
|
||||
import { usePagedQuery } from '../usePagedQuery';
|
||||
|
||||
export function useBoardSharesQuery({ boardId }: { boardId: string }, options?: ReactQueryOptions) {
|
||||
const { modified } = useModified('shares');
|
||||
const { get } = useApi();
|
||||
|
||||
return usePagedQuery({
|
||||
queryKey: ['boardShares', { boardId, modified }],
|
||||
queryFn: pageParams => {
|
||||
return get(`/boards/${boardId}/shares`, pageParams);
|
||||
},
|
||||
...options,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user