From ae80786d7a01b5845ef216f55dffc6732f4078e7 Mon Sep 17 00:00:00 2001 From: TaeeunKim Date: Mon, 16 Oct 2023 15:35:41 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20totalElements=EA=B0=80=20null=EC=9D=BC?= =?UTF-8?q?=20=EB=95=8C=20=EC=95=84=EC=98=88=20=EC=BF=BC=EB=A6=AC=EB=A5=BC?= =?UTF-8?q?=20=EB=B3=B4=EB=82=B4=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/hooks/queries/recipe/useInfiniteRecipeCommentQuery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/hooks/queries/recipe/useInfiniteRecipeCommentQuery.ts b/frontend/src/hooks/queries/recipe/useInfiniteRecipeCommentQuery.ts index dd870941b..068520c8a 100644 --- a/frontend/src/hooks/queries/recipe/useInfiniteRecipeCommentQuery.ts +++ b/frontend/src/hooks/queries/recipe/useInfiniteRecipeCommentQuery.ts @@ -10,7 +10,7 @@ interface PageParam { const fetchRecipeComments = async (pageParam: PageParam, recipeId: number) => { const { lastId, totalElements } = pageParam; - const queries = `?lastId=${lastId}${totalElements !== null ? `&totalElements=${totalElements}` : ''}`; + const queries = totalElements === null ? '' : `?lastId=${lastId}&totalElements=${totalElements}`; const response = await recipeApi.get({ params: `/${recipeId}/comments`,