Doceditor:Hooks:UseTheme: fix base theme
This commit is contained in:
parent
ac75ffbb1b
commit
28d45586d2
@ -39,15 +39,19 @@ const useTheme = ({ user }: UseThemeProps) => {
|
||||
const getUserTheme = React.useCallback(() => {
|
||||
if (!currentColorTheme || !user?.theme) return;
|
||||
let theme = user.theme;
|
||||
|
||||
if (user.theme === ThemeKeys.SystemStr) theme = SYSTEM_THEME;
|
||||
|
||||
if (theme === ThemeKeys.BaseStr)
|
||||
if (theme === ThemeKeys.BaseStr) {
|
||||
setTheme({
|
||||
...Base,
|
||||
currentColorScheme: currentColorTheme,
|
||||
interfaceDirection: "ltr",
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
setTheme({
|
||||
...Dark,
|
||||
currentColorScheme: currentColorTheme,
|
||||
|
Loading…
Reference in New Issue
Block a user