代码优化
This commit is contained in:
@@ -7,6 +7,7 @@ import { useTranslations } from "next-intl"
|
||||
import { useFolderContext } from "@/contexts/folder-context"
|
||||
import { defineMonacoThemes, useMonacoThemeSync } from "@/lib/monaco-themes"
|
||||
import { cn } from "@/lib/utils"
|
||||
import "@/lib/monaco-local"
|
||||
|
||||
type RowMarker = "none" | "added" | "deleted" | "modified"
|
||||
type DiffFileMode = "modified" | "added" | "deleted" | "renamed"
|
||||
@@ -71,8 +72,6 @@ interface HunkPreviewLine {
|
||||
marker: RowMarker
|
||||
}
|
||||
|
||||
import "@/lib/monaco-local"
|
||||
|
||||
const MonacoEditor = dynamic(async () => import("@monaco-editor/react"), {
|
||||
ssr: false,
|
||||
})
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
ContextMenuTrigger,
|
||||
} from "@/components/ui/context-menu"
|
||||
import { defineMonacoThemes, useMonacoThemeSync } from "@/lib/monaco-themes"
|
||||
import "@/lib/monaco-local"
|
||||
|
||||
const AUTO_SAVE_DELAY_MS = 5000
|
||||
|
||||
@@ -291,8 +292,6 @@ function setEditorHiddenAreas(
|
||||
hiddenAreaEditor.setHiddenAreas?.(ranges)
|
||||
}
|
||||
|
||||
import "@/lib/monaco-local"
|
||||
|
||||
const MonacoEditor = dynamic(async () => import("@monaco-editor/react"), {
|
||||
ssr: false,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user