mirror of
https://github.com/umami-software/umami.git
synced 2026-02-10 23:57:12 +01:00
Renamed query hooks. Fixed conversion bugs.
This commit is contained in:
parent
adca3c36d0
commit
7886c3f393
110 changed files with 423 additions and 489 deletions
16
src/components/hooks/queries/useTeamMembersQuery.ts
Normal file
16
src/components/hooks/queries/useTeamMembersQuery.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { useApi } from '../useApi';
|
||||
import { usePagedQuery } from '../usePagedQuery';
|
||||
import { useModified } from '../useModified';
|
||||
|
||||
export function useTeamMembersQuery(teamId: string) {
|
||||
const { get } = useApi();
|
||||
const { modified } = useModified(`teams:members`);
|
||||
|
||||
return usePagedQuery({
|
||||
queryKey: ['teams:members', { teamId, modified }],
|
||||
queryFn: (params: any) => {
|
||||
return get(`/teams/${teamId}/users`, params);
|
||||
},
|
||||
enabled: !!teamId,
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue