onCommentAdd
prop of the VeltComments component to add custom metadata when a comment is added.commentType: 'manual'
property to the metadata object.addManualComment
method to create a comment with custom metadata.Comment Annotations
using the useCommentAnnotations()
hook.To learn more about the useCommentAnnotations()
hook, read here.Velt Comment Pin
component and pass in the Comment Annotation Id
.
Now retrieve the context
to retrieve the custom metadata you set earlier and use it to set the position of the Comment Pin
.