"use client"; import { ComponentPropsWithoutRef, forwardRef } from "react"; import { DiffEditor as MonacoDiffEditor } from "@monaco-editor/react"; import { useTheme } from "next-themes"; export type EditorProps = ComponentPropsWithoutRef; export const DiffEditor = forwardRef( ({ options, theme, ...props }, ref) => { const { theme: appTheme } = useTheme(); const themeToUse = theme ?? (appTheme === "light" ? "light" : "vs-dark"); return ( ); } ); DiffEditor.displayName = "Editor";