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

hide home link on onboarding flow #48

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/components/NavBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Shows global top navigation bar with all apps menu, logo and user menu.
*/
import React, {
import React, {
useState,
useCallback,
Fragment,
Expand Down Expand Up @@ -51,6 +51,14 @@ const NavBar = ({ hideSwitchTools }) => {
[setActiveApp]
);

const renderTopcoderLogo = hideSwitchTools ? (
<img src={TCLogo} alt="Topcoder Logo" />
) : (
<Link to="/">
<img src={TCLogo} alt="Topcoder Logo" />
</Link>
);

return (
<div className="navbar">
<div className="navbar-left">
Expand All @@ -60,9 +68,7 @@ const NavBar = ({ hideSwitchTools }) => {
)
) : (
<Fragment>
<Link to="/">
<img src={TCLogo} alt="Topcoder Logo" />
</Link>
{renderTopcoderLogo}
<div className="navbar-divider"></div>
<div className="navbar-app-title">
{activeApp ? activeApp.title : ""}
Expand All @@ -72,13 +78,7 @@ const NavBar = ({ hideSwitchTools }) => {
</div>

<div className="navbar-center">
{isMobile ? (
<Link to="/">
<img src={TCLogo} alt="Topcoder Logo" />
</Link>
) : (
<Fragment></Fragment>
)}
{isMobile ? renderTopcoderLogo : <Fragment></Fragment>}
{process.env.NODE_ENV === "test" && (
<h3 style={{ display: "none" }}>Navbar App Test</h3>
)}
Expand Down