This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 1 file changed +11
-13
lines changed
1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 3
3
*
4
4
* Shows global top navigation bar with all apps menu, logo and user menu.
5
5
*/
6
- import React , {
6
+ import React , {
7
7
useState ,
8
8
useCallback ,
9
9
Fragment ,
@@ -51,6 +51,12 @@ const NavBar = ({ hideSwitchTools }) => {
51
51
[ setActiveApp ]
52
52
) ;
53
53
54
+ const renderTopcoderLogo = hideSwitchTools ? null : (
55
+ < Link to = "/" >
56
+ < img src = { TCLogo } alt = "Topcoder Logo" />
57
+ </ Link >
58
+ ) ;
59
+
54
60
return (
55
61
< div className = "navbar" >
56
62
< div className = "navbar-left" >
@@ -60,10 +66,8 @@ const NavBar = ({ hideSwitchTools }) => {
60
66
)
61
67
) : (
62
68
< Fragment >
63
- < Link to = "/" >
64
- < img src = { TCLogo } alt = "Topcoder Logo" />
65
- </ Link >
66
- < div className = "navbar-divider" > </ div >
69
+ { renderTopcoderLogo }
70
+ { hideSwitchTools ? null : < div className = "navbar-divider" > </ div > }
67
71
< div className = "navbar-app-title" >
68
72
{ activeApp ? activeApp . title : "" }
69
73
</ div >
@@ -72,13 +76,7 @@ const NavBar = ({ hideSwitchTools }) => {
72
76
</ div >
73
77
74
78
< div className = "navbar-center" >
75
- { isMobile ? (
76
- < Link to = "/" >
77
- < img src = { TCLogo } alt = "Topcoder Logo" />
78
- </ Link >
79
- ) : (
80
- < Fragment > </ Fragment >
81
- ) }
79
+ { isMobile ? renderTopcoderLogo : < Fragment > </ Fragment > }
82
80
{ process . env . NODE_ENV === "test" && (
83
81
< h3 style = { { display : "none" } } > Navbar App Test</ h3 >
84
82
) }
@@ -107,7 +105,7 @@ const NavBar = ({ hideSwitchTools }) => {
107
105
) : (
108
106
< Fragment >
109
107
{ hideSwitchTools ? null : < AllAppsMenu appChange = { changeApp } /> }
110
- < div className = "navbar-divider" > </ div >
108
+ { hideSwitchTools ? null : < div className = "navbar-divider" > </ div > }
111
109
{ auth . isInitialized &&
112
110
( auth . tokenV3 ? (
113
111
auth . profile && (
You can’t perform that action at this time.
0 commit comments