Refactor imports and handle async operations in components

This commit is contained in:
2025-05-23 22:13:25 +02:00
parent 646a897b93
commit ad2334c414
5 changed files with 59 additions and 51 deletions

View File

@@ -26,7 +26,7 @@ const Editor: React.FC<EditorProps> = ({
useEffect(() => {
const handleEditorSave = (view: EditorView): boolean => {
handleSave(selectedFile, view.state.doc.toString());
void handleSave(selectedFile, view.state.doc.toString());
return true;
};
@@ -85,6 +85,8 @@ const Editor: React.FC<EditorProps> = ({
view.destroy();
viewRef.current = null;
};
// TODO: Refactor
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [colorScheme, handleContentChange, handleSave, selectedFile]);
useEffect(() => {