interface CommentNodeProps

Passed to CommentNode by CommentThread for each top-level comment, and by CommentNode for each reply. The callbacks are CommentThread's, passed down unchanged.

Properties

tree: Map<string, Comment[]>

The replies of every comment, by parent id, from CommentThread.

depth: number

Sets the replies' --depth: the deeper, the narrower their indent.

dumpId: string
onCommentCreated: (comment: Comment) => void
onCommentDeleted: (commentId: string) => void
onCommentUpdated: (comment: Comment) => void

Usage

import { type CommentNodeProps } from "src/components/comment/CommentNode.tsx";