From dcce86d8452dc7ff25ebc21f731b94fb056f1571 Mon Sep 17 00:00:00 2001 From: hookor Date: Fri, 31 May 2024 23:08:08 +0900 Subject: [PATCH] Fix: render comments --- src/components/post/PostComments.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/post/PostComments.tsx b/src/components/post/PostComments.tsx index 0df333b..19f7f84 100644 --- a/src/components/post/PostComments.tsx +++ b/src/components/post/PostComments.tsx @@ -36,7 +36,8 @@ const PostComments = ({ {count} {commentData && - commentData.data.map((comment: CommentType, idx: number) => { + commentData.data.length !== 0 && + commentData.data.map((comment: CommentType, idx: number) => ( - ; - })} + + ))} )} {commentData && commentData.data.length === 0 && (