mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-10 21:07:05 -06:00
chore(ckeditor): solve a few eslint warnings
This commit is contained in:
parent
2834af66e9
commit
d8b3e438f8
@ -125,7 +125,7 @@ export default function EditableText({ note, parentComponent, ntxId, noteContext
|
|||||||
|
|
||||||
const resp = await note_create.createNoteWithTypePrompt(notePath, {
|
const resp = await note_create.createNoteWithTypePrompt(notePath, {
|
||||||
activate: false,
|
activate: false,
|
||||||
title: title
|
title
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!resp || !resp.note) return;
|
if (!resp || !resp.note) return;
|
||||||
@ -321,7 +321,7 @@ function EditableTextTouchBar({ watchdogRef, refreshTouchBarRef }: { watchdogRef
|
|||||||
const [ headingSelectedIndex, setHeadingSelectedIndex ] = useState<number>();
|
const [ headingSelectedIndex, setHeadingSelectedIndex ] = useState<number>();
|
||||||
|
|
||||||
function refresh() {
|
function refresh() {
|
||||||
let headingSelectedIndex: number | undefined = undefined;
|
let headingSelectedIndex: number | undefined;
|
||||||
const editor = watchdogRef.current?.editor;
|
const editor = watchdogRef.current?.editor;
|
||||||
const headingCommand = editor?.commands.get("heading");
|
const headingCommand = editor?.commands.get("heading");
|
||||||
const paragraphCommand = editor?.commands.get("paragraph");
|
const paragraphCommand = editor?.commands.get("paragraph");
|
||||||
@ -335,7 +335,7 @@ function EditableTextTouchBar({ watchdogRef, refreshTouchBarRef }: { watchdogRef
|
|||||||
setHeadingSelectedIndex(headingSelectedIndex);
|
setHeadingSelectedIndex(headingSelectedIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
useEffect(refresh, []);
|
useEffect(refresh, [ watchdogRef ]);
|
||||||
refreshTouchBarRef.current = refresh;
|
refreshTouchBarRef.current = refresh;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user