import { useQuery } from "@tanstack/react-query"; import { getStats, type Stats, type ApiError } from "api/api"; export default function AllTimeStats() { const { isPending, isError, data, error } = useQuery({ queryKey: ["stats", "all_time"], queryFn: ({ queryKey }) => getStats(queryKey[1]), }); if (isPending) { return (
Loading...
Error: {error.message}