import { useQuery } from "urql"; import { ArticleList } from "../components"; import { GetReadArticlesDocument } from "../graphql/generated/graphql"; export function ReadArticles() { const [{ data, fetching, error }] = useQuery({ query: GetReadArticlesDocument, }); if (fetching) { return
{data.readArticles.length} article {data.readArticles.length !== 1 ? "s" : ""}
)}