Projekt

Obecné

Profil

Stáhnout (591 Bajtů) Statistiky
| Větev: | Tag: | Revize:
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
        return <p>Došlo k chybě. Anotace nebyla nalezena</p>;
14
    }
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
}