mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-30 22:39:34 +08:00
site: solve display exception when use happy work theme in dark mode (#44720)
* site: solve display exception when use happly work theme in dark mode * feat: remove log * feat: optimize code
This commit is contained in:
parent
3e97fee28c
commit
b9dfb1847d
@ -39,15 +39,17 @@ const RESPONSIVE_MOBILE = 768;
|
||||
// }
|
||||
|
||||
const getAlgorithm = (themes: ThemeName[] = []) =>
|
||||
themes.map((theme) => {
|
||||
if (theme === 'dark') {
|
||||
return antdTheme.darkAlgorithm;
|
||||
}
|
||||
if (theme === 'compact') {
|
||||
return antdTheme.compactAlgorithm;
|
||||
}
|
||||
return antdTheme.defaultAlgorithm;
|
||||
});
|
||||
themes
|
||||
.map((theme) => {
|
||||
if (theme === 'dark') {
|
||||
return antdTheme.darkAlgorithm;
|
||||
}
|
||||
if (theme === 'compact') {
|
||||
return antdTheme.compactAlgorithm;
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.filter((item) => item);
|
||||
|
||||
const GlobalLayout: React.FC = () => {
|
||||
const outlet = useOutlet();
|
||||
|
Loading…
Reference in New Issue
Block a user