File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/frontend/src/pages/document Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ const Document = (): JSX.Element => {
19
19
setIsLoading ( true ) ; // Step 2
20
20
try {
21
21
const response = await documentRead ( id ) ;
22
- const data = await response . json ( ) ;
23
- setDocument ( data ) ;
22
+ const data = await response . text ( ) ; //
23
+ setDocument ( data as any ) ; //
24
24
} catch ( error ) {
25
25
console . error ( error ) ;
26
26
setDocument ( null ) ;
@@ -30,7 +30,7 @@ const Document = (): JSX.Element => {
30
30
} ;
31
31
32
32
if ( params . id ) {
33
- getDocument ( params . id ) ;
33
+ getDocument ( params . id as string ) ; //
34
34
}
35
35
} , [ params . id ] ) ;
36
36
@@ -41,7 +41,7 @@ const Document = (): JSX.Element => {
41
41
) : document ? (
42
42
< p > { document . content } </ p >
43
43
) : (
44
- < h1 > Document not found. Please try again.</ h1 >
44
+ < p > Document not found. Please try again.</ p >
45
45
) }
46
46
</ >
47
47
) ;
You can’t perform that action at this time.
0 commit comments