website cleanup
This commit is contained in:
15
apps/website/hooks/useLeagueScoringPresets.ts
Normal file
15
apps/website/hooks/useLeagueScoringPresets.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useServices } from '@/lib/services/ServiceProvider';
|
||||
import type { LeagueScoringPresetDTO } from '@/lib/types/generated/LeagueScoringPresetDTO';
|
||||
|
||||
export function useLeagueScoringPresets() {
|
||||
const { leagueService } = useServices();
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['leagueScoringPresets'],
|
||||
queryFn: async () => {
|
||||
const result = await leagueService.getScoringPresets();
|
||||
return result as LeagueScoringPresetDTO[];
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user