We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f6725e commit 8f420cdCopy full SHA for 8f420cd
src/frontend/src/pages/document/Document.tsx
@@ -19,8 +19,8 @@ const Document = (): JSX.Element => {
19
setIsLoading(true); // Step 2
20
try {
21
const response = await documentRead(id);
22
- const data = await response.text(); //
23
- setDocument(data as any); //
+ const data: DocumentData = await response.json(); // Parse response as JSON
+ setDocument(data); // Use the parsed and typed data
24
} catch (error) {
25
console.error(error);
26
setDocument(null);
0 commit comments