This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 1 file changed +11
-11
lines changed
1 file changed +11
-11
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,14 @@ const NavBar = ({ hideSwitchTools }) => {
51
51
[ setActiveApp ]
52
52
) ;
53
53
54
+ const renderTopcoderLogo = hideSwitchTools ? (
55
+ < img src = { TCLogo } alt = "Topcoder Logo" />
56
+ ) : (
57
+ < Link to = "/" >
58
+ < img src = { TCLogo } alt = "Topcoder Logo" />
59
+ </ Link >
60
+ ) ;
61
+
54
62
return (
55
63
< div className = "navbar" >
56
64
< div className = "navbar-left" >
@@ -60,9 +68,7 @@ const NavBar = ({ hideSwitchTools }) => {
60
68
)
61
69
) : (
62
70
< Fragment >
63
- < Link to = "/" >
64
- < img src = { TCLogo } alt = "Topcoder Logo" />
65
- </ Link >
71
+ { renderTopcoderLogo }
66
72
< div className = "navbar-divider" > </ div >
67
73
< div className = "navbar-app-title" >
68
74
{ activeApp ? activeApp . title : "" }
@@ -72,13 +78,7 @@ const NavBar = ({ hideSwitchTools }) => {
72
78
</ div >
73
79
74
80
< div className = "navbar-center" >
75
- { isMobile ? (
76
- < Link to = "/" >
77
- < img src = { TCLogo } alt = "Topcoder Logo" />
78
- </ Link >
79
- ) : (
80
- < Fragment > </ Fragment >
81
- ) }
81
+ { isMobile ? renderTopcoderLogo : < Fragment > </ Fragment > }
82
82
{ process . env . NODE_ENV === "test" && (
83
83
< h3 style = { { display : "none" } } > Navbar App Test</ h3 >
84
84
) }
You can’t perform that action at this time.
0 commit comments