mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 05:07:15 +01:00
12 lines
265 B
TypeScript
12 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;
|