blob: 5c3973596516675d177804abbd5db45efbb4d319 (
plain)
1
2
3
4
5
6
7
8
9
10
|
import { atomWithSuspenseQuery } from "jotai-tanstack-query";
import { api } from "../services/api-client";
export const feedsAtom = atomWithSuspenseQuery(() => ({
queryKey: ["feeds"],
queryFn: async () => {
const { data } = await api.GET("/api/feeds");
return data ?? [];
},
}));
|