refactor: improve logging

This commit is contained in:
Elias Schneider
2023-05-09 08:45:30 +02:00
parent 98c0de78e8
commit 2dc0fc9332
2 changed files with 17 additions and 13 deletions

View File

@@ -116,10 +116,9 @@ const TextPreview = () => {
const [text, setText] = useState<string | null>(null);
useEffect(() => {
api.get(`/shares/${shareId}/files/${fileId}?download=false`).then((res) => {
console.log(res.data);
setText(res.data);
});
api
.get(`/shares/${shareId}/files/${fileId}?download=false`)
.then((res) => setText(res.data));
}, [shareId, fileId]);
return (