● Zion Boggan
repos/Drophawk/frontend/hooks/useDrops.ts
zionboggan.com ↗
12 lines · typescript
History for this file →
1
"use client";
2
 
3
import { useQuery } from "@tanstack/react-query";
4
import { api } from "@/lib/api";
5
import { queryKeys } from "@/lib/query";
6
 
7
export function useRecentDrops(perPage = 30) {
8
  return useQuery({
9
    queryKey: queryKeys.drops({ per_page: perPage }),
10
    queryFn: () => api.drops({ per_page: perPage }),
11
  });
12
}