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 = () => {
38
38
39
39
useEffect ( ( ) => {
40
40
41
- if ( headerInit . current || ! profileReady || ! tcUniNav ) {
41
+ if ( headerInit . current ) {
42
42
return
43
43
}
44
44
@@ -55,10 +55,37 @@ const Header: FC = () => {
55
55
signIn ( ) { window . location . href = authUrlLogin ( ) } ,
56
56
signOut ( ) { window . location . href = authUrlLogout } ,
57
57
signUp ( ) { window . location . href = authUrlSignup ( ) } ,
58
+ type : 'tool' ,
59
+ } ,
60
+ )
61
+ } , [ ] )
62
+
63
+ useEffect ( ( ) => {
64
+
65
+ tcUniNav (
66
+ 'update' ,
67
+ navElementId ,
68
+ {
58
69
toolName : activeToolName ,
59
70
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 ? {
62
89
handle : profile . handle ,
63
90
initials : `${ profile . firstName . charAt ( 0 ) } ${ profile . lastName . charAt ( 0 ) } ` ,
64
91
photoURL : profile . photoURL ,
@@ -67,8 +94,6 @@ const Header: FC = () => {
67
94
} ,
68
95
)
69
96
} , [
70
- activeToolName ,
71
- activeToolRoute ,
72
97
profileReady ,
73
98
profile ,
74
99
] )
You can’t perform that action at this time.
0 commit comments