import { queryOptions } from "@tanstack/react-query"; import { fetchKPI, fetchKennzahlen, fetchPitchBooks } from "./api"; export const kpiQueryOptions = (pitchBookId: string) => queryOptions({ queryKey: ["pitchBookKPI", pitchBookId], queryFn: () => fetchKPI(pitchBookId), }); export const settingsQueryOptions = () => queryOptions({ queryKey: ["pitchBookSettings"], queryFn: () => fetchKennzahlen(), }); export const pitchBooksQueryOptions = () => queryOptions({ queryKey: ["pitchBooks"], queryFn: fetchPitchBooks, staleTime: 30000, });