Renders the comments under a dump on its page, /@:username/dumps/:slug.
f
CommentThread(unnamed 0: CommentThreadProps): React.JSX.Element
Renders the comment count, the form that posts a comment when someone is signed in, and the tree of CommentNode.
I
CommentThreadProps
Passed to CommentThread by the Dump page, which holds the comments.
The page applies the changes this user makes through the callbacks, and the
ones others make from the socket's comment events, so a change can come
both ways and must be applied once.
-
comments: Comment[]
Every comment on the dump, flat and oldest first, deleted ones included so their replies keep their place.
- currentUser: SelfUser | null
- dumpId: string
- onCommentCreated: (comment: Comment) => void
- onCommentDeleted: (commentId: string) => void
- onCommentUpdated: (comment: Comment) => void
Usage
import * as mod from "src/components/comment/CommentThread.tsx";