1
|
/**
|
2
|
* Creates an annotation view of a document.
|
3
|
* @returns The annotation view.
|
4
|
*/
|
5
|
import { useContext } from 'react';
|
6
|
import { AnnotationContext } from '../../contexts/AnnotationContext';
|
7
|
import { Button } from 'antd';
|
8
|
|
9
|
export function DocumentAnnotationView() {
|
10
|
const { annotation } = useContext(AnnotationContext);
|
11
|
|
12
|
if (!annotation) {
|
13
|
return <p>Došlo k chybě. Anotace nebyla nalezena</p>;
|
14
|
}
|
15
|
|
16
|
return (
|
17
|
<div>
|
18
|
<div
|
19
|
dangerouslySetInnerHTML={{ __html: annotation.documentToRender ?? '' }}
|
20
|
/>
|
21
|
</div>
|
22
|
);
|
23
|
}
|