Renamed query hooks. Fixed conversion bugs.
This commit is contained in:
10
src/components/hooks/queries/useTeamQuery.ts
Normal file
10
src/components/hooks/queries/useTeamQuery.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { useApi } from '../useApi';
|
||||
|
||||
export function useTeamQuery(teamId: string) {
|
||||
const { get, useQuery } = useApi();
|
||||
return useQuery({
|
||||
queryKey: ['teams', teamId],
|
||||
queryFn: () => get(`/teams/${teamId}`),
|
||||
enabled: !!teamId,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user