fix incorrect usage of useCustomTheme

This commit is contained in:
huzibaca
2024-10-29 09:07:08 +08:00
parent 014829e69a
commit 9d476d7add
5 changed files with 10 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
import React, { ReactNode } from "react";
import { Typography } from "@mui/material";
import { BaseErrorBoundary } from "./base-error-boundary";
import { useCustomTheme } from "@/components/layout/use-custom-theme";
import { useTheme } from "@mui/material/styles";
interface Props {
title?: React.ReactNode; // the page title
@@ -13,7 +13,7 @@ interface Props {
export const BasePage: React.FC<Props> = (props) => {
const { title, header, contentStyle, full, children } = props;
const { theme } = useCustomTheme();
const theme = useTheme();
const isDark = theme.palette.mode === "dark";

View File

@@ -4,6 +4,7 @@ import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
import { useSetThemeMode, useThemeMode } from "@/services/states";
import { defaultTheme, defaultDarkTheme } from "@/pages/_theme";
import { useVerge } from "@/hooks/use-verge";
import { useTheme } from "@mui/material/styles";
const appWindow = getCurrentWebviewWindow();
/**