mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 23:27:12 +01:00
Added teams pages. Refactored hooks.
This commit is contained in:
parent
a2c202fa36
commit
9448aa3ab5
136 changed files with 387 additions and 287 deletions
12
src/components/hooks/queries/useTeam.ts
Normal file
12
src/components/hooks/queries/useTeam.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import useApi from './useApi';
|
||||
|
||||
export function useTeam(teamId: string) {
|
||||
const { get, useQuery } = useApi();
|
||||
return useQuery({
|
||||
queryKey: ['teams', teamId],
|
||||
queryFn: () => get(`/teams/${teamId}`),
|
||||
enabled: !!teamId,
|
||||
});
|
||||
}
|
||||
|
||||
export default useTeam;
|
||||
Loading…
Add table
Add a link
Reference in a new issue