Skip to content

Commit 8f420cd

Browse files
change suggested from copilot
Co-authored-by: Copilot <[email protected]>
1 parent 6f6725e commit 8f420cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/frontend/src/pages/document/Document.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ const Document = (): JSX.Element => {
1919
setIsLoading(true); // Step 2
2020
try {
2121
const response = await documentRead(id);
22-
const data = await response.text(); //
23-
setDocument(data as any); //
22+
const data: DocumentData = await response.json(); // Parse response as JSON
23+
setDocument(data); // Use the parsed and typed data
2424
} catch (error) {
2525
console.error(error);
2626
setDocument(null);

0 commit comments

Comments
 (0)