File
Blob: src/client/lib/queries/page-shares.ts
| 1 | import { queryOptions } from "@tanstack/react-query"; |
| 2 | import { api } from "@/client/lib/api"; |
| 3 | |
| 4 | export const pageSharesQueryKey = (pageId: string) => ["page-shares", pageId] as const; |
| 5 | |
| 6 | export const pageSharesQueryOptions = (pageId: string) => |
| 7 | queryOptions({ |
| 8 | queryKey: pageSharesQueryKey(pageId), |
| 9 | queryFn: () => api.shares.list(pageId), |
| 10 | staleTime: 30_000, |
| 11 | }); |