Vizel API / react/src / UseVizelCommentResult
Interface: UseVizelCommentResult
Defined in: packages/react/src/hooks/useVizelComment.ts:15
Comment hook result
Properties
activeCommentId
activeCommentId: string | null;Defined in: packages/react/src/hooks/useVizelComment.ts:19
Currently active comment ID
addComment
addComment: (text, author?) => Promise<VizelComment | null>;Defined in: packages/react/src/hooks/useVizelComment.ts:25
Add a comment to the current selection
Parameters
| Parameter | Type |
|---|---|
text | string |
author? | string |
Returns
Promise<VizelComment | null>
comments
comments: VizelComment[];Defined in: packages/react/src/hooks/useVizelComment.ts:17
All stored comments (newest first)
error
error: Error | null;Defined in: packages/react/src/hooks/useVizelComment.ts:23
Last error that occurred
getCommentById
getCommentById: (commentId) =>
| VizelComment
| undefined;Defined in: packages/react/src/hooks/useVizelComment.ts:43
Get a comment by its ID
Parameters
| Parameter | Type |
|---|---|
commentId | string |
Returns
| VizelComment | undefined
isLoading
isLoading: boolean;Defined in: packages/react/src/hooks/useVizelComment.ts:21
Whether comments are loading
loadComments
loadComments: () => Promise<VizelComment[]>;Defined in: packages/react/src/hooks/useVizelComment.ts:41
Load all comments from storage
Returns
Promise<VizelComment[]>
removeComment
removeComment: (commentId) => Promise<void>;Defined in: packages/react/src/hooks/useVizelComment.ts:27
Remove a comment and its mark
Parameters
| Parameter | Type |
|---|---|
commentId | string |
Returns
Promise<void>
reopenComment
reopenComment: (commentId) => Promise<boolean>;Defined in: packages/react/src/hooks/useVizelComment.ts:31
Reopen a resolved comment
Parameters
| Parameter | Type |
|---|---|
commentId | string |
Returns
Promise<boolean>
replyToComment
replyToComment: (commentId, text, author?) => Promise<
| VizelCommentReply
| null>;Defined in: packages/react/src/hooks/useVizelComment.ts:33
Add a reply to a comment
Parameters
| Parameter | Type |
|---|---|
commentId | string |
text | string |
author? | string |
Returns
Promise< | VizelCommentReply | null>
resolveComment
resolveComment: (commentId) => Promise<boolean>;Defined in: packages/react/src/hooks/useVizelComment.ts:29
Mark a comment as resolved
Parameters
| Parameter | Type |
|---|---|
commentId | string |
Returns
Promise<boolean>
setActiveComment
setActiveComment: (commentId) => void;Defined in: packages/react/src/hooks/useVizelComment.ts:39
Set the active comment
Parameters
| Parameter | Type |
|---|---|
commentId | string | null |
Returns
void