mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +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])
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user