refactor(theme): update Monaco theme configuration to use default light and dark themes

This commit is contained in:
cfngc4594 2025-03-28 13:08:14 +08:00
parent 33e19d3318
commit d859796755

View File

@ -1,11 +1,10 @@
import { useTheme } from "next-themes"; import { useTheme } from "next-themes";
import { MonacoTheme } from "@/types/monaco-theme"; import { DefaultLightThemeConfig, DefaultDarkThemeConfig } from "@/config/monaco-theme";
import { MonacoThemeConfig } from "@/config/monaco-theme";
export function useMonacoTheme() { export function useMonacoTheme() {
const { resolvedTheme } = useTheme(); const { resolvedTheme } = useTheme();
const currentTheme = resolvedTheme === "light" ? MonacoThemeConfig[MonacoTheme.GitHubLightDefault].id : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault].id; const currentTheme = resolvedTheme === "light" ? DefaultLightThemeConfig.id : DefaultDarkThemeConfig.id;
return { return {
currentTheme, currentTheme,