Skip to content

Commit 94e7d74

Browse files
committed
Build fix
1 parent 910aeb8 commit 94e7d74

File tree

1 file changed

+15
-0
lines changed
  • src/shared/containers/TopcoderHeader

1 file changed

+15
-0
lines changed

src/shared/containers/TopcoderHeader/index.jsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* global tcUniNav */
22
import React, { useEffect, useMemo, useRef } from 'react';
3+
import PT from 'prop-types';
34
import { connect } from 'react-redux';
45
import { config } from 'topcoder-react-utils';
56
import LoadingIndicator from 'components/LoadingIndicator';
@@ -45,6 +46,11 @@ const TopcoderHeader = ({ auth }) => {
4546
return type;
4647
}, []);
4748

49+
const navigationUserInfo = {
50+
...user,
51+
initials: getInitials(user.firstName, user.lastName),
52+
};
53+
4854
useEffect(() => {
4955
if (uniNavInitialized.current) {
5056
return;
@@ -53,6 +59,8 @@ const TopcoderHeader = ({ auth }) => {
5359

5460
uniNavInitialized.current = true;
5561
const user = _.get(auth, 'profile') || {};
62+
const authToken = _.get(auth, 'tokenV3');
63+
const isAuthenticated = !!authToken;
5664

5765
counter += 1;
5866

@@ -87,6 +95,13 @@ const TopcoderHeader = ({ auth }) => {
8795
<div styleName="header-container" id={headerElId.current} ref={headerRef} />
8896
);
8997
};
98+
TopcoderHeader.defaultProps = {
99+
auth: {},
100+
};
101+
102+
TopcoderHeader.propTypes = {
103+
auth: PT.shape(),
104+
};
90105

91106
const mapStateToProps = state => ({
92107
auth: state.auth,

0 commit comments

Comments
 (0)