Revize 7652cf88
Přidáno uživatelem Lukáš Vlček před asi 2 roky(ů)
webapp/pages/annotation/[id].tsx | ||
---|---|---|
13 | 13 |
*/ |
14 | 14 |
function Annotation() { |
15 | 15 |
const router = useRouter(); |
16 |
const { idRaw } = router.query;
|
|
16 |
const { id } = router.query; |
|
17 | 17 |
|
18 |
if (!idRaw || typeof idRaw === 'string') {
|
|
19 |
(async () => { |
|
18 |
if (!id || typeof id !== 'string') {
|
|
19 |
/*(async () => {
|
|
20 | 20 |
await router.push('/documents'); |
21 |
})(); // TODO |
|
22 |
return; |
|
21 |
})(); // TODO*/ |
|
22 |
|
|
23 |
return <p>Načítání...</p>; |
|
23 | 24 |
} |
24 | 25 |
|
25 |
const annotationId: string = Array.isArray(idRaw) ? idRaw[0] : idRaw;
|
|
26 |
const annotationId: string = Array.isArray(id) ? id[0] : id;
|
|
26 | 27 |
|
27 | 28 |
return ( |
28 | 29 |
<AnnotationProvider annotationId={annotationId}> |
Také k dispozici: Unified diff
Basic annotation document preview