From 1c73c999ac78d2e6d3a8c68b4e17058046326f55 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sat, 12 Jul 2025 14:55:19 +0900
Subject: feat(frontend): create pages and components

---
 frontend/src/pages/ReadArticles.tsx | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 frontend/src/pages/ReadArticles.tsx

(limited to 'frontend/src/pages/ReadArticles.tsx')

diff --git a/frontend/src/pages/ReadArticles.tsx b/frontend/src/pages/ReadArticles.tsx
new file mode 100644
index 0000000..4863d63
--- /dev/null
+++ b/frontend/src/pages/ReadArticles.tsx
@@ -0,0 +1,34 @@
+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 <div className="p-4">Loading read articles...</div>;
+	}
+
+	if (error) {
+		return <div className="p-4 text-red-600">Error: {error.message}</div>;
+	}
+
+	return (
+		<div>
+			<div className="border-b border-gray-200 bg-white px-4 py-3">
+				<h1 className="text-xl font-semibold text-gray-900">Read Articles</h1>
+				{data?.readArticles && (
+					<p className="text-sm text-gray-500">
+						{data.readArticles.length} article
+						{data.readArticles.length !== 1 ? "s" : ""}
+					</p>
+				)}
+			</div>
+			{data?.readArticles && (
+				<ArticleList articles={data.readArticles} showReadStatus={true} />
+			)}
+		</div>
+	);
+}
-- 
cgit v1.2.3-70-g09d2

