From 01b45c1a8db111f2b099b1671b871ec36fe45f2b Mon Sep 17 00:00:00 2001 From: miteruzo Date: Sun, 29 Jun 2025 05:35:52 +0900 Subject: [PATCH] =?UTF-8?q?#57=20=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/posts/PostListPage.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/src/pages/posts/PostListPage.tsx b/frontend/src/pages/posts/PostListPage.tsx index 4739775..5344d13 100644 --- a/frontend/src/pages/posts/PostListPage.tsx +++ b/frontend/src/pages/posts/PostListPage.tsx @@ -34,13 +34,14 @@ export default () => { })) setWikiPage (null) - if (!(tags.length)) - return - void (axios.get (`${ API_BASE_URL }/wiki/title/${ encodeURIComponent (tags.join (' ')) }`) - .then (res => setWikiPage (toCamel (res.data, { deep: true }))) - .catch (() => { - ; - })) + if (tags.length === 1) + { + void (axios.get (`${ API_BASE_URL }/wiki/title/${ encodeURIComponent (tags[0]) }`) + .then (res => setWikiPage (toCamel (res.data, { deep: true }))) + .catch (() => { + ; + })) + } }, [location.search]) return (