@@ -10,6 +10,7 @@ import {
10
10
useState ,
11
11
} from 'react'
12
12
import { NavigateFunction , useNavigate } from 'react-router-dom'
13
+ import { type TcUniNavFn } from 'universal-navigation'
13
14
import classNames from 'classnames'
14
15
15
16
import { EnvironmentConfig , PageSubheaderPortalId } from '../config'
@@ -27,7 +28,7 @@ import {
27
28
import UniNavSnippet from './universal-nav-snippet'
28
29
29
30
// eslint-disable-next-line @typescript-eslint/no-explicit-any
30
- declare let tcUniNav : any
31
+ declare let tcUniNav : TcUniNavFn
31
32
UniNavSnippet ( EnvironmentConfig . UNIVERSAL_NAV . URL )
32
33
33
34
interface NavigationRequest {
@@ -80,13 +81,13 @@ const Header: FC = () => {
80
81
signIn ( ) { window . location . href = authUrlLogin ( ) } ,
81
82
signOut ( ) { window . location . href = authUrlLogout } ,
82
83
signUp ( ) { window . location . href = authUrlSignup ( ) } ,
83
- toolName : activeToolName ,
84
- toolRoot : activeToolRoute ,
84
+ toolName : activeToolName ?? '' ,
85
+ toolRoot : activeToolRoute ?? '' ,
85
86
type : 'tool' ,
86
87
user : profile ? {
87
88
handle : profile . handle ,
88
89
initials : `${ profile . firstName . charAt ( 0 ) } ${ profile . lastName . charAt ( 0 ) } ` ,
89
- photoURL : profile . photoURL ,
90
+ photoURL : profile . photoURL ?? '' ,
90
91
userId : profile . userId ,
91
92
} : undefined ,
92
93
} ,
@@ -109,8 +110,8 @@ const Header: FC = () => {
109
110
'update' ,
110
111
navElementId ,
111
112
{
112
- toolName : activeToolName ,
113
- toolRoute : activeToolRoute ,
113
+ toolName : activeToolName ?? '' ,
114
+ toolRoot : activeToolRoute ?? '' ,
114
115
} ,
115
116
)
116
117
} , [
0 commit comments