From 9ec7b8d6796957bf484face2113b4dab90967fd5 Mon Sep 17 00:00:00 2001 From: yukionishi1129 Date: Thu, 18 Apr 2024 23:27:27 +0900 Subject: [PATCH] language --- .../articles/components/ArticleList.tsx | 4 +++ .../components/ArticleListTemplate.tsx | 31 ++++++------------- 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/web/client/src/features/articles/components/ArticleList.tsx b/web/client/src/features/articles/components/ArticleList.tsx index 7417a0c2..b6cbc822 100644 --- a/web/client/src/features/articles/components/ArticleList.tsx +++ b/web/client/src/features/articles/components/ArticleList.tsx @@ -91,6 +91,10 @@ export function ArticleList({ }; }, [hashMore]); + useEffect(() => { + setArticles(initialArticles); + }, [initialArticles]); + useEffect(() => { if (offset > 1) { loadMore(offset); diff --git a/web/client/src/features/articles/components/ArticleListTemplate.tsx b/web/client/src/features/articles/components/ArticleListTemplate.tsx index d5be2a72..666432ad 100644 --- a/web/client/src/features/articles/components/ArticleListTemplate.tsx +++ b/web/client/src/features/articles/components/ArticleListTemplate.tsx @@ -123,28 +123,15 @@ const ArticleListContent = async ({ /> - {languageStatus === 1 && ( - - )} - {languageStatus === 2 && ( - - )} + ); };