Doceditor:Hooks:UseTheme: fix base theme

This commit is contained in:
Timofey Boyko 2024-02-26 14:40:06 +03:00
parent ac75ffbb1b
commit 28d45586d2

View File

@ -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,