@@ -14,9 +14,6 @@ const headerElIdTmpl = 'uninav-headerNav';
14
14
15
15
const TopcoderHeader = ( { auth } ) => {
16
16
const uniNavInitialized = useRef ( false ) ;
17
- const user = _ . get ( auth , 'profile' ) || { } ;
18
- const authToken = _ . get ( auth , 'tokenV3' ) ;
19
- const isAuthenticated = ! ! authToken ;
20
17
const authURLs = config . HEADER_AUTH_URLS ;
21
18
const headerRef = useRef ( ) ;
22
19
const headerElId = useRef ( `${ headerElIdTmpl } -${ counter } ` ) ;
@@ -49,11 +46,6 @@ const TopcoderHeader = ({ auth }) => {
49
46
return type ;
50
47
} , [ ] ) ;
51
48
52
- const navigationUserInfo = {
53
- ...user ,
54
- initials : getInitials ( user . firstName , user . lastName ) ,
55
- } ;
56
-
57
49
useEffect ( ( ) => {
58
50
if ( uniNavInitialized . current ) {
59
51
return ;
@@ -70,6 +62,7 @@ const TopcoderHeader = ({ auth }) => {
70
62
type : navType ,
71
63
toolName : getSubPageConfiguration ( ) . toolName ,
72
64
toolRoot : getSubPageConfiguration ( ) . toolRoot ,
65
+ user :'auto' ,
73
66
signOut : ( ) => {
74
67
window . location = `${ config . URL . BASE } /logout?ref=nav` ;
75
68
} ,
@@ -82,12 +75,6 @@ const TopcoderHeader = ({ auth }) => {
82
75
} ) ;
83
76
} , [ navType ] ) ;
84
77
85
- useEffect ( ( ) => {
86
- tcUniNav ( 'update' , headerElId . current , {
87
- user : isAuthenticated ? navigationUserInfo : null ,
88
- } ) ;
89
- } , [ isAuthenticated , navigationUserInfo ] ) ;
90
-
91
78
return (
92
79
< div styleName = "header-container" id = { headerElId . current } ref = { headerRef } />
93
80
) ;
0 commit comments