diff --git a/src/components/Editor/MonacoEditor.tsx b/src/components/Editor/MonacoEditor.tsx index e195c24..3a9291b 100644 --- a/src/components/Editor/MonacoEditor.tsx +++ b/src/components/Editor/MonacoEditor.tsx @@ -8,10 +8,9 @@ import { configMonaco } from "./monacoConfig"; type Props = { onMount?: () => void; + defaultTheme?: string; }; -const defaultTheme = localStorage.getItem("theme") as string; - export const MonacoEditor: FC = (props) => { const { updateFile, getFile } = useProject(); const { @@ -101,7 +100,7 @@ export const MonacoEditor: FC = (props) => { defaultValue={getFile(getRuntime().currentFile)?.value} beforeMount={handleEditorBeforeMount} onMount={handleEditorMount} - theme={defaultTheme} + theme={props.defaultTheme} language="javascript" options={{ fontSize: 20, diff --git a/src/components/FileTree/FileEntry.tsx b/src/components/FileTree/FileEntry.tsx index f89cb0e..4655eaa 100644 --- a/src/components/FileTree/FileEntry.tsx +++ b/src/components/FileTree/FileEntry.tsx @@ -6,7 +6,6 @@ import { cn } from "../../util/cn"; import { removeExtension } from "../../util/removeExtensions"; import "./FileEntry.css"; import { useEditor } from "../../hooks/useEditor"; -import { debug } from "../../util/logs"; type Props = { file: File; @@ -23,11 +22,13 @@ const FileButton: FC<{ onClick: MouseEventHandler; icon: keyof typeof assets; rotate?: 0 | 90 | 180 | 270; + hidden?: boolean; }> = (props) => { return (