@@ -15,8 +15,6 @@ import { ThemeType } from '@/constants';
1515import GlobalComponent from '../init/GlobalComponent' ;
1616import styles from './index.less' ;
1717import { useUserStore , queryCurUser } from '@/store/user' ;
18- import AppTitleBar from '@/blocks/AppTitleBar' ;
19- import OpenScreenAnimation from '@/components/OpenScreenAnimation' ;
2018
2119const GlobalLayout = ( ) => {
2220 const [ appTheme , setAppTheme ] = useTheme ( ) ;
@@ -63,20 +61,18 @@ const GlobalLayout = () => {
6361 } ;
6462
6563 // 等待状态页面
66- // if (serviceStatus === ServiceStatus.PENDING || curUser === null) {
67- // return (
68- // <div className={styles.app}>
69- // <AppTitleBar className={styles.appTitleBar} />
70- // <Spin className={styles.loadingBox} size="large" />
71- // </div>
72- // );
73- // }
64+ if ( serviceStatus === ServiceStatus . PENDING || curUser === null ) {
65+ return (
66+ < div className = { styles . app } >
67+ < Spin className = { styles . loadingBox } size = "large" />
68+ </ div >
69+ ) ;
70+ }
7471
7572 // 错误状态页面
7673 if ( serviceStatus === ServiceStatus . FAILURE ) {
7774 return (
7875 < div className = { styles . app } >
79- < AppTitleBar className = { styles . appTitleBar } />
8076 < div className = { styles . loadingBox } >
8177 < Button type = "primary" onClick = { restartPolling } style = { { marginBottom : 20 } } >
8278 < SyncOutlined />
@@ -100,9 +96,6 @@ const GlobalLayout = () => {
10096 return (
10197 < ConfigProvider locale = { isEn ? antdEnUS : antdZhCN } theme = { antdTheme } >
10298 < div className = { styles . app } >
103- { /* Open screen animation */ }
104- { ( serviceStatus === ServiceStatus . PENDING || curUser === null ) && < OpenScreenAnimation /> }
105- < AppTitleBar className = { styles . appTitleBar } />
10699 < div className = { styles . appBody } >
107100 < Outlet />
108101 </ div >
0 commit comments