mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
refactor(code-editor-store): replace DefaultEditorLanguageConfig with DEFAULT_EDITOR_LANGUAGE constant
This commit is contained in:
parent
b0bb5b5250
commit
07ffcf439b
@ -6,7 +6,7 @@ import { JudgeResultMetadata } from "@/types/judge";
|
||||
import { createJSONStorage, persist } from "zustand/middleware";
|
||||
import { LanguageServerMetadata } from "@/types/language-server";
|
||||
import { DefaultEditorOptionConfig } from "@/config/editor-option";
|
||||
import { DefaultEditorLanguageConfig } from "@/config/editor-language";
|
||||
import { DEFAULT_EDITOR_LANGUAGE } from "@/config/editor-language";
|
||||
|
||||
interface CodeEditorState {
|
||||
hydrated: boolean;
|
||||
@ -33,8 +33,8 @@ export const useCodeEditorStore = create<CodeEditorState>()(
|
||||
persist(
|
||||
(set) => ({
|
||||
hydrated: false,
|
||||
language: DefaultEditorLanguageConfig.id,
|
||||
path: getPath(DefaultEditorLanguageConfig.id),
|
||||
language: DEFAULT_EDITOR_LANGUAGE,
|
||||
path: getPath(DEFAULT_EDITOR_LANGUAGE),
|
||||
value: "",
|
||||
lspConfig: null,
|
||||
isLspEnabled: true,
|
||||
|
Loading…
Reference in New Issue
Block a user