From 989e56d90e6e4c9e2847cea55b512efb52c52ee5 Mon Sep 17 00:00:00 2001 From: Wooseong Kim Date: Thu, 14 Sep 2023 21:14:45 +0900 Subject: [PATCH] =?UTF-8?q?fix(home):=20=ED=99=88=20=ED=94=BC=EB=93=9C=20?= =?UTF-8?q?=EC=98=81=EC=97=AD=EC=97=90=EC=84=9C=20=EC=8B=A4=EC=A0=9C=20?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=EB=A1=9C=20Pagination=20=EC=9D=84?= =?UTF-8?q?=20=EA=B5=AC=EC=84=B1=ED=95=98=EB=8F=84=EB=A1=9D=20=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/react-world/src/components/home/HomeFeedContents.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/react-world/src/components/home/HomeFeedContents.tsx b/apps/react-world/src/components/home/HomeFeedContents.tsx index 9c629291..d0e8f294 100644 --- a/apps/react-world/src/components/home/HomeFeedContents.tsx +++ b/apps/react-world/src/components/home/HomeFeedContents.tsx @@ -4,10 +4,14 @@ import PopularArticleTagList from './PopularArticleTagList'; import HomeFeedTab from './HomeFeedTab'; import Pagination from './Pagination'; import useArticlePreviewQuery from '../../quries/useArticlePreviewQuery'; +import { ARTICLE_PREVIEW_FETCH_LIMIT } from '../../apis/article/ArticlePreviewService'; const HomeFeedContents = () => { // TODO: Zustand Store 에서 초기값을 지정하고, 이후 현재 페이지 정보를 가지도록 구현 필요 const { data, isLoading } = useArticlePreviewQuery(1); + const totalPageCount = data?.articlesCount + ? data.articlesCount / ARTICLE_PREVIEW_FETCH_LIMIT + : 0; return ( @@ -24,7 +28,7 @@ const HomeFeedContents = () => { articlePreview={articlePreview} /> ))} - + )}