mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
feat(code-editor): use default file path for code editor based on language
This commit is contained in:
parent
545f094f49
commit
6f2d853531
@ -5,6 +5,7 @@ import dynamic from "next/dynamic";
|
||||
import { useTheme } from "next-themes";
|
||||
import normalizeUrl from "normalize-url";
|
||||
import { highlighter } from "@/lib/shiki";
|
||||
import { DEFAULT_PATH } from "@/config/path";
|
||||
import { DEFAULT_VALUE } from "@/config/value";
|
||||
import { shikiToMonaco } from "@shikijs/monaco";
|
||||
import { Skeleton } from "@/components/ui/skeleton";
|
||||
@ -99,7 +100,7 @@ export default function CodeEditor() {
|
||||
<Editor
|
||||
defaultLanguage={language}
|
||||
defaultValue={DEFAULT_VALUE[language]}
|
||||
path="file:///main.c"
|
||||
path={DEFAULT_PATH[language]}
|
||||
theme={resolvedTheme === "light" ? "github-light-default" : "github-dark-default"}
|
||||
className="h-[calc(100vh-56px)]"
|
||||
options={mergeOptions}
|
||||
|
Loading…
Reference in New Issue
Block a user