this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 14 lines 535 B view raw
1import { queryOptions } from "@tanstack/react-query"; 2import { getServerArticleStream } from "./__article.functions"; 3import type { ArticleSlug } from "./schemas"; 4 5export const getArticleQueryOptions = ({ slug }: { slug: ArticleSlug }) => 6 queryOptions({ 7 queryKey: ["article", { slug }] as const, 8 structuralSharing: false, 9 staleTime: Infinity, 10 queryFn: async ({ queryKey }) => { 11 const { Renderable } = await getServerArticleStream({ data: queryKey[1].slug }); 12 return { Article: Renderable }; 13 }, 14 });