refactor(code-editor): update editor change handler and remove unused event parameter

This commit is contained in:
cfngc4594 2025-03-09 11:50:23 +08:00
parent a691992404
commit 28a4b0631d

View File

@ -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 <CodeEditorLoadingSkeleton />;
}
function handleEditorWillMount(monaco: Monaco) {
const handleEditorWillMount = (monaco: Monaco) => {
shikiToMonaco(highlighter, monaco);
}