mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
Fix theme bug with code preview
This commit is contained in:
parent
a83eef57e2
commit
8c38d983c6
1 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ import { ScrollArea } from "@/components/ui/scroll-area";
|
|||
import { EditorView, keymap, ViewPlugin, ViewUpdate } from "@codemirror/view";
|
||||
import { Cross1Icon, FileIcon } from "@radix-ui/react-icons";
|
||||
import { useTheme } from "next-themes";
|
||||
import { useMemo, useState } from "react";
|
||||
import { useEffect, useMemo, useState } from "react";
|
||||
import CodeMirror from '@uiw/react-codemirror';
|
||||
import { vim } from "@replit/codemirror-vim";
|
||||
import { defaultKeymap } from "@codemirror/commands";
|
||||
|
|
@ -32,7 +32,7 @@ export const CodePreview = ({
|
|||
}
|
||||
|
||||
return _theme ?? "light";
|
||||
}, [_theme]);
|
||||
}, [_theme, systemTheme]);
|
||||
|
||||
const [gutterWidth, setGutterWidth] = useState(0);
|
||||
const gutterWidthPlugin = useMemo(() => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue