Function: useInlineReviews()
useInlineReviews(
preprintUri,options):UseQueryResult<{cursor:string;hasMore:boolean;reviews:object[];total:number; },Error>
Defined in: web/lib/hooks/use-review.ts:221
Fetches inline reviews (span annotations) for a preprint.
Parameters
preprintUri
string
AT-URI of the preprint
options
UseReviewsOptions = {}
Hook options
Returns
UseQueryResult<{ cursor: string; hasMore: boolean; reviews: object[]; total: number; }, Error>
Query result with inline reviews
Remarks
Returns only reviews that have a target text span. Used for rendering annotation markers on the PDF viewer.
Example
const { data } = useInlineReviews(preprintUri);
return (
<PDFAnnotationLayer annotations={data?.reviews ?? []} />
);