Files
umami/src/components/hooks/queries/useTeam.ts
2024-01-28 18:33:40 -08:00

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;