1 |
ac59aec1
|
Dominik Poch
|
/**
|
2 |
|
|
* Creates an annotation view of a document.
|
3 |
|
|
* @returns The annotation view.
|
4 |
|
|
*/
|
5 |
7652cf88
|
Lukáš Vlček
|
import { useContext } from 'react';
|
6 |
|
|
import { AnnotationContext } from '../../contexts/AnnotationContext';
|
7 |
|
|
import { Button } from 'antd';
|
8 |
|
|
|
9 |
6d10fe14
|
Dominik Poch
|
export function DocumentAnnotationView() {
|
10 |
7652cf88
|
Lukáš Vlček
|
const { annotation } = useContext(AnnotationContext);
|
11 |
|
|
|
12 |
|
|
if (!annotation) {
|
13 |
c9762683
|
Vojtěch Bartička
|
return <p>Probíhá načítání anotace ...</p>;
|
14 |
7652cf88
|
Lukáš Vlček
|
}
|
15 |
|
|
|
16 |
ac59aec1
|
Dominik Poch
|
return (
|
17 |
|
|
<div>
|
18 |
b5f60842
|
Lukáš Vlček
|
<div
|
19 |
|
|
dangerouslySetInnerHTML={{ __html: annotation.documentToRender ?? '' }}
|
20 |
|
|
/>
|
21 |
ac59aec1
|
Dominik Poch
|
</div>
|
22 |
|
|
);
|
23 |
|
|
}
|