From 28a4b0631dc92a4b2d7be7ac0c33b1735c6e5263 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sun, 9 Mar 2025 11:50:23 +0800 Subject: [PATCH] refactor(code-editor): update editor change handler and remove unused event parameter --- src/components/code-editor.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/code-editor.tsx b/src/components/code-editor.tsx index c287322..7ee4b17 100644 --- a/src/components/code-editor.tsx +++ b/src/components/code-editor.tsx @@ -71,7 +71,7 @@ export default function CodeEditor({ } }, [valueStorageKey, setValue, templates, language]) - const handleEditorChange = (value: string | undefined, event: editor.IModelContentChangedEvent) => { + const handleEditorChange = (value: string | undefined) => { if (value === undefined) return; setValue(value); localStorage.setItem(valueStorageKey, value); @@ -135,7 +135,7 @@ export default function CodeEditor({ return ; } - function handleEditorWillMount(monaco: Monaco) { + const handleEditorWillMount = (monaco: Monaco) => { shikiToMonaco(highlighter, monaco); }