From 0f0a08196a045d49cf98bb2b841e6475cc0c94a6 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 4 Aug 2025 09:27:30 +0900 Subject: refactor(frontend): Remove unnecessary component property --- frontend/src/components/ArticleItem.tsx | 35 +++++++++++++++------------------ frontend/src/components/ArticleList.tsx | 9 ++------- frontend/src/pages/ReadArticles.tsx | 4 +--- frontend/src/pages/UnreadArticles.tsx | 4 +--- 4 files changed, 20 insertions(+), 32 deletions(-) (limited to 'frontend/src') diff --git a/frontend/src/components/ArticleItem.tsx b/frontend/src/components/ArticleItem.tsx index 8fb00b0..faa86fe 100644 --- a/frontend/src/components/ArticleItem.tsx +++ b/frontend/src/components/ArticleItem.tsx @@ -18,10 +18,9 @@ type Article = NonNullable< interface Props { article: Article; - showReadStatus?: boolean; } -export function ArticleItem({ article, showReadStatus = true }: Props) { +export function ArticleItem({ article }: Props) { const [, markArticleRead] = useMutation(MarkArticleReadDocument); const [, markArticleUnread] = useMutation(MarkArticleUnreadDocument); @@ -66,23 +65,21 @@ export function ArticleItem({ article, showReadStatus = true }: Props) { : "border-blue-200 bg-blue-50" }`} > - {showReadStatus && ( - - )} +
diff --git a/frontend/src/pages/ReadArticles.tsx b/frontend/src/pages/ReadArticles.tsx index 4863d63..44ae834 100644 --- a/frontend/src/pages/ReadArticles.tsx +++ b/frontend/src/pages/ReadArticles.tsx @@ -26,9 +26,7 @@ export function ReadArticles() {

)} - {data?.readArticles && ( - - )} + {data?.readArticles && } ); } diff --git a/frontend/src/pages/UnreadArticles.tsx b/frontend/src/pages/UnreadArticles.tsx index 38bf077..f82d4dc 100644 --- a/frontend/src/pages/UnreadArticles.tsx +++ b/frontend/src/pages/UnreadArticles.tsx @@ -26,9 +26,7 @@ export function UnreadArticles() {

)} - {data?.unreadArticles && ( - - )} + {data?.unreadArticles && } ); } -- cgit v1.2.3-70-g09d2