diff --git a/components/ui/Comments.tsx b/components/ui/Comments.tsx
index 249889a..a71bc75 100644
--- a/components/ui/Comments.tsx
+++ b/components/ui/Comments.tsx
@@ -52,13 +52,10 @@ Comments.ReplyButton = function ReplyButton({comment}: ReplyButton) {
)
}
-Comments.Comment = function Comment({comment, children, isReply = false}: {
+Comments.Comment = function Comment({comment, isReply = false}: {
comment: Comment,
- children?: ReactNode,
isReply?: boolean
}) {
- const {data: session} = useSession()
-
return (
<>
- {children}
>
)
}
@@ -96,11 +92,14 @@ Comments.List = function List({comments}: CommentsListProps) {
Comments
{comments.map((comment) => (
-
- {comment.replies && comment.replies.map(reply => (
-
- ))}
-
+
+
+ {(typeof comment.replies !== 'undefined' && comment.replies.length > 0) ?
+ comment.replies.map(reply => (
+
+ )) : null
+ }
+
))}
}