@@ -3,8 +3,11 @@ import React, { useEffect, useMemo, useRef } from 'react';
3
3
import PT from 'prop-types' ;
4
4
import { connect } from 'react-redux' ;
5
5
import { config } from 'topcoder-react-utils' ;
6
+ import LoadingIndicator from 'components/LoadingIndicator' ;
6
7
import _ from 'lodash' ;
7
- import { getInitials , getSubPageConfiguration } from '../utils/url' ;
8
+ import { getInitials , getSubPageConfiguration } from '../../utils/url' ;
9
+ import { SSRPlaceholder } from '../../utils/SSR' ;
10
+ import './styles.scss' ;
8
11
9
12
let counter = 0 ;
10
13
const headerElIdTmpl = 'uninav-headerNav' ;
@@ -81,9 +84,10 @@ const TopcoderHeader = ({ auth }) => {
81
84
} ) ;
82
85
} , [ isAuthenticated , navigationUserInfo ] ) ;
83
86
84
- return < div id = { headerElId . current } ref = { headerRef } /> ;
87
+ return (
88
+ < div styleName = "header-container" id = { headerElId . current } ref = { headerRef } />
89
+ ) ;
85
90
} ;
86
-
87
91
TopcoderHeader . defaultProps = {
88
92
auth : { } ,
89
93
} ;
@@ -96,4 +100,15 @@ const mapStateToProps = state => ({
96
100
auth : state . auth ,
97
101
} ) ;
98
102
99
- export default connect ( mapStateToProps , null ) ( TopcoderHeader ) ;
103
+ const TopcoderHeaderConnect = connect ( mapStateToProps , null ) ( TopcoderHeader ) ;
104
+
105
+ const TopcoderHeaderPlaceholder = ( ) => (
106
+ < div styleName = "header-container header-container-placeholder" >
107
+ < LoadingIndicator />
108
+ </ div >
109
+ ) ;
110
+
111
+ export default SSRPlaceholder ( ) (
112
+ TopcoderHeaderConnect ,
113
+ TopcoderHeaderPlaceholder ,
114
+ ) ;
0 commit comments