fix: 修改主题出错 (#1327)

Reviewed-on: daoyoucloud/tachybase#1327
Reviewed-by: sealday <zhanglin@daoyoucloud.com>
Co-authored-by: wjh <wwwjh0710@163.com>
Co-committed-by: wjh <wwwjh0710@163.com>
This commit is contained in:
wjh 2024-07-17 10:52:32 +08:00 committed by sealday
parent b76f065cf7
commit 182d409c79

View File

@ -1,5 +1,5 @@
import React, { useCallback } from 'react';
import { compatOldTheme, defaultTheme, useGlobalTheme, useToken } from '@tachybase/client';
import { defaultTheme, useGlobalTheme, useToken } from '@tachybase/client';
import { PlusOutlined } from '@ant-design/icons';
import { App, Button, Space } from 'antd';
@ -25,7 +25,7 @@ const ToEditTheme = () => {
<Button
onClick={() => {
setCurrentSettingTheme(theme);
setTheme(compatOldTheme(theme));
setTheme(theme);
setOpen(true);
m.destroy();
}}
@ -36,7 +36,7 @@ const ToEditTheme = () => {
type={'primary'}
onClick={() => {
setCurrentSettingTheme(theme);
setTheme(compatOldTheme(defaultTheme));
setTheme(defaultTheme);
setOpen(true);
m.destroy();
}}