Skip to content

Commit

Permalink
Fix: PostComments
Browse files Browse the repository at this point in the history
  • Loading branch information
cuconveniencestore authored and hookor committed May 31, 2024
1 parent a1fe671 commit 67fc10b
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions src/components/post/PostComments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,20 @@ const PostComments = ({
{commentCount}
{count}
</Length>
{commentData.data.map((comment: CommentType, idx: number) => {
<React.Fragment key={id + idx}>
<Comment
profileUrl={comment.profileUrl}
nickname={comment.nickname}
content={comment.content}
created_at={comment.created_at}
reply_count={comment.reply_count}
postNum={postNum}
id={comment.id}
/>
</React.Fragment>;
})}
{commentData &&
commentData.data.map((comment: CommentType, idx: number) => {
<React.Fragment key={id + idx}>
<Comment
profileUrl={comment.profileUrl}
nickname={comment.nickname}
content={comment.content}
created_at={comment.created_at}
reply_count={comment.reply_count}
postNum={postNum}
id={comment.id}
/>
</React.Fragment>;
})}
</Container>
)}
{commentData && commentData.data.length === 0 && (
Expand Down

0 comments on commit 67fc10b

Please sign in to comment.