Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 129f536

Browse files
committed
hide home link on onboarding flow
1 parent a682676 commit 129f536

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/components/NavBar/index.jsx

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Shows global top navigation bar with all apps menu, logo and user menu.
55
*/
6-
import React, {
6+
import React, {
77
useState,
88
useCallback,
99
Fragment,
@@ -51,6 +51,12 @@ const NavBar = ({ hideSwitchTools }) => {
5151
[setActiveApp]
5252
);
5353

54+
const renderTopcoderLogo = hideSwitchTools ? null : (
55+
<Link to="/">
56+
<img src={TCLogo} alt="Topcoder Logo" />
57+
</Link>
58+
);
59+
5460
return (
5561
<div className="navbar">
5662
<div className="navbar-left">
@@ -60,10 +66,8 @@ const NavBar = ({ hideSwitchTools }) => {
6066
)
6167
) : (
6268
<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>}
6771
<div className="navbar-app-title">
6872
{activeApp ? activeApp.title : ""}
6973
</div>
@@ -72,13 +76,7 @@ const NavBar = ({ hideSwitchTools }) => {
7276
</div>
7377

7478
<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>}
8280
{process.env.NODE_ENV === "test" && (
8381
<h3 style={{ display: "none" }}>Navbar App Test</h3>
8482
)}
@@ -107,7 +105,7 @@ const NavBar = ({ hideSwitchTools }) => {
107105
) : (
108106
<Fragment>
109107
{hideSwitchTools ? null : <AllAppsMenu appChange={changeApp} />}
110-
<div className="navbar-divider"></div>
108+
{hideSwitchTools ? null : <div className="navbar-divider"></div>}
111109
{auth.isInitialized &&
112110
(auth.tokenV3 ? (
113111
auth.profile && (

0 commit comments

Comments
 (0)