Skip to content

Commit cc32705

Browse files
committed
Use auto user handling
1 parent 1c412af commit cc32705

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/components/TopBar/index.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,10 @@ const BASE = COMMUNITY_APP_URL
1616
const TopBar = ({ auth }) => {
1717
const uniNavInitialized = useRef(false)
1818
const toolNameRef = useRef('Work Manager')
19-
const user = _.get(auth, 'user') || {}
20-
const authToken = _.get(auth, 'token')
21-
const isAuthenticated = !!authToken
2219
const authURLs = HEADER_AUTH_URLS
2320
const headerRef = useRef()
2421
const [headerId, setHeaderId] = useState(0)
2522

26-
const navigationUserInfo = {
27-
...user,
28-
initials: getInitials(user.firstName, user.lastName)
29-
}
30-
3123
useEffect(() => {
3224
uniqueId += 1
3325
setHeaderId(uniqueId)
@@ -46,7 +38,7 @@ const TopBar = ({ auth }) => {
4638
type: 'tool',
4739
toolName: toolNameRef.current,
4840
toolRoot: '/',
49-
user: isAuthenticated ? navigationUserInfo : null,
41+
user: 'auto',
5042
signOut: () => {
5143
window.location = `${BASE}/logout?ref=nav`
5244
},

0 commit comments

Comments
 (0)