mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
fix(useMonacoTheme): return theme ID instead of the full theme object
This commit is contained in:
parent
783b8415ea
commit
458bdfbf42
@ -56,7 +56,7 @@ export default function MdxPreview({ source }: MdxPreviewProps) {
|
|||||||
[
|
[
|
||||||
rehypePretty,
|
rehypePretty,
|
||||||
{
|
{
|
||||||
theme: currentTheme.id,
|
theme: currentTheme,
|
||||||
keepBackground: false,
|
keepBackground: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -5,7 +5,7 @@ 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] : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault];
|
const currentTheme = resolvedTheme === "light" ? MonacoThemeConfig[MonacoTheme.GitHubLightDefault].id : MonacoThemeConfig[MonacoTheme.GitHubDarkDefault].id;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
currentTheme,
|
currentTheme,
|
||||||
|
Loading…
Reference in New Issue
Block a user