move static data
This commit is contained in:
15
apps/website/hooks/usePenaltyTypesReference.ts
Normal file
15
apps/website/hooks/usePenaltyTypesReference.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { useServices } from '@/lib/services/ServiceProvider';
|
||||
import type { PenaltyTypesReferenceDTO } from '@/lib/types/PenaltyTypesReferenceDTO';
|
||||
|
||||
export function usePenaltyTypesReference() {
|
||||
const { penaltyService } = useServices();
|
||||
|
||||
return useQuery<PenaltyTypesReferenceDTO>({
|
||||
queryKey: ['penaltyTypesReference'],
|
||||
queryFn: () => penaltyService.getPenaltyTypesReference(),
|
||||
staleTime: 5 * 60 * 1000,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user