Skip to content

Commit

Permalink
[FE] fix: totalElements와 comments 변수를 destructing 하는 방법 수정 (#801)
Browse files Browse the repository at this point in the history
  • Loading branch information
xodms0309 authored Oct 19, 2023
1 parent c832bb4 commit 08aeb2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/Recipe/CommentList/CommentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ const CommentList = ({ recipeId }: CommentListProps) => {
const { fetchNextPage, hasNextPage, data } = useInfiniteRecipeCommentQuery(Number(recipeId));
useIntersectionObserver<HTMLDivElement>(fetchNextPage, scrollRef, hasNextPage);

const [{ totalElements, comments }] = data.pages.flatMap((page) => page);
const [{ totalElements }] = data.pages.flatMap((page) => page);
const comments = data.pages.flatMap((page) => page.comments);

return (
<>
Expand Down

0 comments on commit 08aeb2f

Please sign in to comment.