mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
13 lines
265 B
TypeScript
13 lines
265 B
TypeScript
|
|
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;
|