Skip to content

Commit

Permalink
[FE] feat: totalElements가 null일 때 아예 쿼리를 보내지 않도록 수정 (#774)
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 authored Oct 16, 2023
1 parent be83c6b commit 4cd0eaf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down

0 comments on commit 4cd0eaf

Please sign in to comment.