diff --git a/apps/client/src/features/comment/components/comment-list-item.tsx b/apps/client/src/features/comment/components/comment-list-item.tsx index 41b2f659..b34dbd35 100644 --- a/apps/client/src/features/comment/components/comment-list-item.tsx +++ b/apps/client/src/features/comment/components/comment-list-item.tsx @@ -23,9 +23,14 @@ import { useTranslation } from "react-i18next"; interface CommentListItemProps { comment: IComment; pageId: string; + canComment: boolean; } -function CommentListItem({ comment, pageId }: CommentListItemProps) { +function CommentListItem({ + comment, + pageId, + canComment, +}: CommentListItemProps) { const { t } = useTranslation(); const { hovered, ref } = useHover(); const [isEditing, setIsEditing] = useState(false); @@ -39,7 +44,7 @@ function CommentListItem({ comment, pageId }: CommentListItemProps) { const isCloudEE = useIsCloudEE(); useEffect(() => { - setContent(comment.content) + setContent(comment.content); }, [comment]); async function handleUpdateComment() { @@ -78,7 +83,9 @@ function CommentListItem({ comment, pageId }: CommentListItemProps) { } function handleCommentClick(comment: IComment) { - const el = document.querySelector(`.comment-mark[data-comment-id="${comment.id}"]`); + const el = document.querySelector( + `.comment-mark[data-comment-id="${comment.id}"]`, + ); if (el) { el.scrollIntoView({ behavior: "smooth", block: "center" }); el.classList.add("comment-highlight"); @@ -111,12 +118,12 @@ function CommentListItem({ comment, pageId }: CommentListItemProps) {