{thread.root.author} {thread.root.contents}
{thread.replies.map((reply) => ({reply.author} {reply.contents}
))} {comments.canReply(thread.root.ref) && ( )}import { useState } from 'react';
import { Viewer, DocumentGate } from '@embedpdf/react/runtime';
import type { OpenInput } from '@embedpdf/react/runtime';
import { Stage, stagePlugin, useStage } from '@embedpdf/react/stage';
import { RenderLayer, renderPlugin } from '@embedpdf/react/render';
import { SelectionLayer, selectionPlugin } from '@embedpdf/react/selection';
import { interactionPlugin } from '@embedpdf/react/interaction';
import {
AnnotationLayer,
annotationKey,
annotationPlugin,
useAnnotation,
useAnnotationState,
useComments,
useCommentThreads,
type CommentThreadView,
} from '@embedpdf/react/annotation';
import { localEngine } from '@embedpdf/engine';
import './comments.css';
const engine = localEngine();
const plugins = [
stagePlugin(),
renderPlugin(),
interactionPlugin(),
selectionPlugin(),
annotationPlugin(),
];
// [!doc-source proposal]
const proposal = async (): Promise
{thread.root.author} {thread.root.contents}
{reply.author} {reply.contents}
Loading comments… No comments