李志伟 3 years ago
parent
commit
fa3caeddef
1 changed files with 1 additions and 13 deletions
  1. 1
    13
      src/components/RightContent/index.jsx

+ 1
- 13
src/components/RightContent/index.jsx View File

1
 import { Space } from 'antd';
1
 import { Space } from 'antd';
2
-import React from 'react';
3
-import { useModel } from 'umi';
4
 import Avatar from './AvatarDropdown';
2
 import Avatar from './AvatarDropdown';
5
 import styles from './index.less';
3
 import styles from './index.less';
6
 
4
 
7
 const GlobalHeaderRight = () => {
5
 const GlobalHeaderRight = () => {
8
-  const { initialState } = useModel('@@initialState');
9
-
10
-  if (!initialState || !initialState.settings) {
11
-    return null;
12
-  }
13
-
14
-  const { navTheme, layout } = initialState.settings;
15
   let className = styles.right;
6
   let className = styles.right;
16
-
17
-  if ((navTheme === 'dark' && layout === 'top') || layout === 'mix') {
18
-    className = `${styles.right}  ${styles.dark}`;
19
-  }
7
+  className = `${styles.right}  ${styles.dark}`;
20
 
8
 
21
   return (
9
   return (
22
     <Space className={className}>
10
     <Space className={className}>