Files
Astronome/frontend/src/hooks/useStats.ts
T
2026-04-09 23:23:31 +02:00

11 lines
226 B
TypeScript

import { useQuery } from '@tanstack/react-query';
import { api } from '../api';
export function useStats() {
return useQuery({
queryKey: ['stats'],
queryFn: () => api.stats.get(),
staleTime: 5 * 60_000,
});
}