minor fixes

This commit is contained in:
kacher 2023-11-19 15:17:36 -08:00 committed by GitHub
parent 40c00fc12b
commit fa9124381c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,7 @@
import { useRef, useEffect } from "react";
import { EditorState } from "@codemirror/state";
import { EditorView, keymap, lineNumbers } from "@codemirror/view";
import { espresso } from "thememirror";
import { cobalt } from "thememirror";
import { espresso, cobalt } from "thememirror";
import {
defaultKeymap,
history,
@ -28,7 +26,6 @@ function CodeMirror({ code, editorTheme }: Props) {
if (editorTheme === "espresso") {
selectedTheme = espresso;
}
view.current = new EditorView({
state: EditorState.create({
doc: code,
@ -71,4 +68,4 @@ function CodeMirror({ code, editorTheme }: Props) {
);
}
export default CodeMirror;
export default CodeMirror;