mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
14 lines
424 B
TypeScript
14 lines
424 B
TypeScript
import { useTheme } from "next-themes";
|
|
import { MonacoTheme } from "@/types/monaco-theme";
|
|
import { MonacoThemeConfig } from "@/config/monaco-theme";
|
|
|
|
export function useMonacoTheme() {
|
|
const { resolvedTheme } = useTheme();
|
|
|
|
const currentTheme = resolvedTheme === "light" ? MonacoThemeConfig[MonacoTheme.GitHubLightDefault].id : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault].id;
|
|
|
|
return {
|
|
currentTheme,
|
|
};
|
|
}
|