Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(ckeditor): solve a few eslint warnings
Elian Dorand8b3e438f8e3
diff --git a/apps/client/src/widgets/type_widgets/text/EditableText.tsx b/apps/client/src/widgets/type_widgets/text/EditableText.tsxindex efc3f7d207..b5d7bfe0bb 100644--- a/apps/client/src/widgets/type_widgets/text/EditableText.tsx+++ b/apps/client/src/widgets/type_widgets/text/EditableText.tsx@@ -125,7 +125,7 @@ export default function EditableText({ note, parentComponent, ntxId, noteContextconst resp = await note_create.createNoteWithTypePrompt(notePath, {activate: false,- title: title+ title});if (!resp || !resp.note) return;@@ -321,7 +321,7 @@ function EditableTextTouchBar({ watchdogRef, refreshTouchBarRef }: { watchdogRefconst [ headingSelectedIndex, setHeadingSelectedIndex ] = useState<number>();function refresh() {- let headingSelectedIndex: number | undefined = undefined;+ let headingSelectedIndex: number | undefined;const editor = watchdogRef.current?.editor;const headingCommand = editor?.commands.get("heading");const paragraphCommand = editor?.commands.get("paragraph");@@ -335,7 +335,7 @@ function EditableTextTouchBar({ watchdogRef, refreshTouchBarRef }: { watchdogRefsetHeadingSelectedIndex(headingSelectedIndex);}- useEffect(refresh, []);+ useEffect(refresh, [ watchdogRef ]);refreshTouchBarRef.current = refresh;return (