mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 00:51:20 +00:00
14 lines
334 B
TypeScript
14 lines
334 B
TypeScript
|
|
import { queryOptions } from "@tanstack/react-query"
|
||
|
|
|
||
|
|
import { useApiClient } from "@/api/client"
|
||
|
|
|
||
|
|
import { FeedItem } from "./types"
|
||
|
|
|
||
|
|
export function useFeedQuery() {
|
||
|
|
const api = useApiClient()
|
||
|
|
return queryOptions({
|
||
|
|
queryKey: ["feed"],
|
||
|
|
queryFn: async () => api.request<{ items: FeedItem[] }>("/feed?render=json-render"),
|
||
|
|
})
|
||
|
|
}
|