mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
refactor(code-editor): update editor change handler and remove unused event parameter
This commit is contained in:
parent
a691992404
commit
28a4b0631d
@ -71,7 +71,7 @@ export default function CodeEditor({
|
|||||||
}
|
}
|
||||||
}, [valueStorageKey, setValue, templates, language])
|
}, [valueStorageKey, setValue, templates, language])
|
||||||
|
|
||||||
const handleEditorChange = (value: string | undefined, event: editor.IModelContentChangedEvent) => {
|
const handleEditorChange = (value: string | undefined) => {
|
||||||
if (value === undefined) return;
|
if (value === undefined) return;
|
||||||
setValue(value);
|
setValue(value);
|
||||||
localStorage.setItem(valueStorageKey, value);
|
localStorage.setItem(valueStorageKey, value);
|
||||||
@ -135,7 +135,7 @@ export default function CodeEditor({
|
|||||||
return <CodeEditorLoadingSkeleton />;
|
return <CodeEditorLoadingSkeleton />;
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleEditorWillMount(monaco: Monaco) {
|
const handleEditorWillMount = (monaco: Monaco) => {
|
||||||
shikiToMonaco(highlighter, monaco);
|
shikiToMonaco(highlighter, monaco);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user