Revize 048b4bc0
Přidáno uživatelem Lukáš Vlček před asi 2 roky(ů)
webapp/pages/annotation/[id].tsx | ||
---|---|---|
15 | 15 |
*/ |
16 | 16 |
function Annotation() { |
17 | 17 |
const router = useRouter(); |
18 |
const { id } = router.query; |
|
18 |
const { id, final } = router.query;
|
|
19 | 19 |
|
20 |
if (!id || typeof id !== 'string') { |
|
20 |
console.log(id, final); |
|
21 |
|
|
22 |
if (!id || typeof id !== 'string' || typeof final !== 'string') { |
|
21 | 23 |
/*(async () => { |
22 | 24 |
await router.push('/documents'); |
23 | 25 |
})(); // TODO*/ |
... | ... | |
25 | 27 |
return <p>Načítání...</p>; |
26 | 28 |
} |
27 | 29 |
|
30 |
console.log('ok'); |
|
31 |
|
|
28 | 32 |
const annotationId: string = Array.isArray(id) ? id[0] : id; |
33 |
const isFinal: boolean = final === 'true'; |
|
29 | 34 |
|
30 | 35 |
return ( |
31 |
<AnnotationProvider annotationId={annotationId}> |
|
36 |
<AnnotationProvider annotationId={annotationId} isFinal={isFinal}>
|
|
32 | 37 |
<TagCategoryProvider> |
33 | 38 |
<MainLayout> |
34 | 39 |
<div className={styles.layoutWrapper}> |
Také k dispozici: Unified diff
Loading final annotation