File tree Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const Header: FC = () => {
3838
3939 useEffect ( ( ) => {
4040
41- if ( headerInit . current || ! profileReady || ! tcUniNav ) {
41+ if ( headerInit . current ) {
4242 return
4343 }
4444
@@ -55,10 +55,37 @@ const Header: FC = () => {
5555 signIn ( ) { window . location . href = authUrlLogin ( ) } ,
5656 signOut ( ) { window . location . href = authUrlLogout } ,
5757 signUp ( ) { window . location . href = authUrlSignup ( ) } ,
58+ type : 'tool' ,
59+ } ,
60+ )
61+ } , [ ] )
62+
63+ useEffect ( ( ) => {
64+
65+ tcUniNav (
66+ 'update' ,
67+ navElementId ,
68+ {
5869 toolName : activeToolName ,
5970 toolRoute : activeToolRoute ,
60- type : 'tool' ,
61- user : profileReady && profile ? {
71+ } ,
72+ )
73+ } , [
74+ activeToolName ,
75+ activeToolRoute ,
76+ ] )
77+
78+ useEffect ( ( ) => {
79+
80+ if ( ! profileReady ) {
81+ return
82+ }
83+
84+ tcUniNav (
85+ 'update' ,
86+ navElementId ,
87+ {
88+ user : profile ? {
6289 handle : profile . handle ,
6390 initials : `${ profile . firstName . charAt ( 0 ) } ${ profile . lastName . charAt ( 0 ) } ` ,
6491 photoURL : profile . photoURL ,
@@ -67,8 +94,6 @@ const Header: FC = () => {
6794 } ,
6895 )
6996 } , [
70- activeToolName ,
71- activeToolRoute ,
7297 profileReady ,
7398 profile ,
7499 ] )
You can’t perform that action at this time.
0 commit comments