@@ -10,6 +10,7 @@ import {
1010 useState ,
1111} from 'react'
1212import { NavigateFunction , useNavigate } from 'react-router-dom'
13+ import { type TcUniNavFn } from 'universal-navigation'
1314import classNames from 'classnames'
1415
1516import { EnvironmentConfig , PageSubheaderPortalId } from '../config'
@@ -27,7 +28,7 @@ import {
2728import UniNavSnippet from './universal-nav-snippet'
2829
2930// eslint-disable-next-line @typescript-eslint/no-explicit-any
30- declare let tcUniNav : any
31+ declare let tcUniNav : TcUniNavFn
3132UniNavSnippet ( EnvironmentConfig . UNIVERSAL_NAV . URL )
3233
3334interface NavigationRequest {
@@ -80,13 +81,13 @@ const Header: FC = () => {
8081 signIn ( ) { window . location . href = authUrlLogin ( ) } ,
8182 signOut ( ) { window . location . href = authUrlLogout } ,
8283 signUp ( ) { window . location . href = authUrlSignup ( ) } ,
83- toolName : activeToolName ,
84- toolRoot : activeToolRoute ,
84+ toolName : activeToolName ?? '' ,
85+ toolRoot : activeToolRoute ?? '' ,
8586 type : 'tool' ,
8687 user : profile ? {
8788 handle : profile . handle ,
8889 initials : `${ profile . firstName . charAt ( 0 ) } ${ profile . lastName . charAt ( 0 ) } ` ,
89- photoURL : profile . photoURL ,
90+ photoURL : profile . photoURL ?? '' ,
9091 userId : profile . userId ,
9192 } : undefined ,
9293 } ,
@@ -109,8 +110,8 @@ const Header: FC = () => {
109110 'update' ,
110111 navElementId ,
111112 {
112- toolName : activeToolName ,
113- toolRoute : activeToolRoute ,
113+ toolName : activeToolName ?? '' ,
114+ toolRoot : activeToolRoute ?? '' ,
114115 } ,
115116 )
116117 } , [
0 commit comments