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

Commit 0ed544a

Browse files
Merge pull request #68 from topcoder-platform/remove-selfService-navbar
remove selfService navbar
2 parents 58282b5 + cc68329 commit 0ed544a

File tree

9 files changed

+17
-471
lines changed

9 files changed

+17
-471
lines changed

src/App.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import React, { useState, useCallback, useMemo, useEffect } from "react";
55
import _ from "lodash";
66
import MainMenu from "./components/MainMenu";
77
import NavBar from "./components/NavBar";
8-
import SelfServiceNavbar from "./components/SelfService/NavBar";
98
import { navigate, Router, useLocation } from "@reach/router";
109
import { useSelector } from "react-redux";
1110
import useMatchSomeRoute from "./hooks/useMatchSomeRoute";
@@ -56,10 +55,10 @@ const App = () => {
5655
return (
5756
<>
5857
<Router>
59-
<SelfServiceNavbar path="/self-service/*" />
6058
<NavBar
6159
default
6260
noThrow
61+
profileUrl={location.pathname.includes('/self-service') ? '/self-service/profile/' : `/profile/${auth.profile.handle}`}
6362
hideSwitchTools={isNavigationDisabled}
6463
path="/*"
6564
/>

src/components/NavBar/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import "./styles.css";
2222
import { useMediaQuery } from "react-responsive";
2323
import NotificationsMenu from "../NotificationsMenu";
2424

25-
const NavBar = ({ hideSwitchTools }) => {
25+
const NavBar = ({ hideSwitchTools, profileUrl }) => {
2626
// all menu options
2727
const menu = useSelector((state) => state.menu.categories);
2828
// flat list of all apps
@@ -96,6 +96,7 @@ const NavBar = ({ hideSwitchTools }) => {
9696
<Fragment>
9797
<NotificationsMenu />
9898
<UserMenu
99+
profileUrl={profileUrl}
99100
profile={auth.profile}
100101
hideSwitchTools={hideSwitchTools}
101102
/>
@@ -121,6 +122,7 @@ const NavBar = ({ hideSwitchTools }) => {
121122
<Fragment>
122123
<NotificationsMenu />
123124
<UserMenu
125+
profileUrl={profileUrl}
124126
profile={auth.profile}
125127
hideSwitchTools={hideSwitchTools}
126128
/>
@@ -140,9 +142,11 @@ const NavBar = ({ hideSwitchTools }) => {
140142

141143
NavBar.defaultProps = {
142144
hideSwitchTools: false,
145+
profileUrl: '/profile/',
143146
};
144147

145148
NavBar.propTypes = {
149+
profileUrl: PropTypes.string,
146150
hideSwitchTools: PropTypes.boolean,
147151
};
148152

src/components/SelfService/NavBar/index.jsx

Lines changed: 0 additions & 112 deletions
This file was deleted.

src/components/SelfService/NavBar/styles.css

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/components/SelfService/NotificationsMenu/index.jsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/components/SelfService/NotificationsMenu/styles.module.scss

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)