@@ -14,9 +14,6 @@ const headerElIdTmpl = 'uninav-headerNav';
1414
1515const TopcoderHeader = ( { auth } ) => {
1616 const uniNavInitialized = useRef ( false ) ;
17- const user = _ . get ( auth , 'profile' ) || { } ;
18- const authToken = _ . get ( auth , 'tokenV3' ) ;
19- const isAuthenticated = ! ! authToken ;
2017 const authURLs = config . HEADER_AUTH_URLS ;
2118 const headerRef = useRef ( ) ;
2219 const headerElId = useRef ( `${ headerElIdTmpl } -${ counter } ` ) ;
@@ -49,11 +46,6 @@ const TopcoderHeader = ({ auth }) => {
4946 return type ;
5047 } , [ ] ) ;
5148
52- const navigationUserInfo = {
53- ...user ,
54- initials : getInitials ( user . firstName , user . lastName ) ,
55- } ;
56-
5749 useEffect ( ( ) => {
5850 if ( uniNavInitialized . current ) {
5951 return ;
@@ -70,6 +62,7 @@ const TopcoderHeader = ({ auth }) => {
7062 type : navType ,
7163 toolName : getSubPageConfiguration ( ) . toolName ,
7264 toolRoot : getSubPageConfiguration ( ) . toolRoot ,
65+ user :'auto' ,
7366 signOut : ( ) => {
7467 window . location = `${ config . URL . BASE } /logout?ref=nav` ;
7568 } ,
@@ -82,12 +75,6 @@ const TopcoderHeader = ({ auth }) => {
8275 } ) ;
8376 } , [ navType ] ) ;
8477
85- useEffect ( ( ) => {
86- tcUniNav ( 'update' , headerElId . current , {
87- user : isAuthenticated ? navigationUserInfo : null ,
88- } ) ;
89- } , [ isAuthenticated , navigationUserInfo ] ) ;
90-
9178 return (
9279 < div styleName = "header-container" id = { headerElId . current } ref = { headerRef } />
9380 ) ;
0 commit comments