Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 2x 2x 2x 2x | import { useQuery } from "@tanstack/react-query";
import { donationStatsKey } from "features/queryKeys";
import { RpcError } from "grpc-web";
import { GetDonationStatsRes } from "proto/public_pb";
import { service } from "service";
export default function useDonationStats() {
return useQuery<GetDonationStatsRes.AsObject, RpcError>({
queryKey: [donationStatsKey],
queryFn: service.publicApi.getDonationStats,
// Cache for 5 minutes
staleTime: 5 * 60 * 1000,
});
}
|