From fae504b35db37b08fd1ec1b1bfa14e3b27998662 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Thu, 20 Mar 2025 14:42:45 +0800 Subject: [PATCH] chore(components): remove unused core-editor component --- src/components/core-editor.tsx | 64 ---------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 src/components/core-editor.tsx diff --git a/src/components/core-editor.tsx b/src/components/core-editor.tsx deleted file mode 100644 index 56d3fc0..0000000 --- a/src/components/core-editor.tsx +++ /dev/null @@ -1,64 +0,0 @@ -"use client"; - -import { cn } from "@/lib/utils"; -import dynamic from "next/dynamic"; -import type { ReactNode } from "react"; -import type { editor } from "monaco-editor"; -import { Loading } from "@/components/loading"; -import type { BeforeMount, OnChange, OnMount } from "@monaco-editor/react"; - -// Dynamically import Monaco Editor with SSR disabled -const Editor = dynamic( - async () => { - await import("vscode"); - const monaco = await import("monaco-editor"); - const { loader } = await import("@monaco-editor/react"); - loader.config({ monaco }); - return (await import("@monaco-editor/react")).Editor; - }, - { - ssr: false, - loading: () => , - } -); - -interface CoreEditorProps { - language?: string; - theme?: string; - path?: string; - value?: string; - beforeMount?: BeforeMount; - onMount?: OnMount; - onChange?: OnChange; - options?: editor.IStandaloneEditorConstructionOptions; - loading?: ReactNode; - className?: string; -} - -export function CoreEditor({ - language, - theme, - path, - value, - beforeMount, - onMount, - onChange, - options, - loading, - className, -}: CoreEditorProps) { - return ( - - ); -}