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

remove selfService navbar #68

Merged
merged 1 commit into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import React, { useState, useCallback, useMemo, useEffect } from "react";
import _ from "lodash";
import MainMenu from "./components/MainMenu";
import NavBar from "./components/NavBar";
import SelfServiceNavbar from "./components/SelfService/NavBar";
import { navigate, Router, useLocation } from "@reach/router";
import { useSelector } from "react-redux";
import useMatchSomeRoute from "./hooks/useMatchSomeRoute";
Expand Down Expand Up @@ -56,10 +55,10 @@ const App = () => {
return (
<>
<Router>
<SelfServiceNavbar path="/self-service/*" />
<NavBar
default
noThrow
profileUrl={location.pathname.includes('/self-service') ? '/self-service/profile/' : `/profile/${auth.profile.handle}`}
hideSwitchTools={isNavigationDisabled}
path="/*"
/>
Expand Down
6 changes: 5 additions & 1 deletion src/components/NavBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import "./styles.css";
import { useMediaQuery } from "react-responsive";
import NotificationsMenu from "../NotificationsMenu";

const NavBar = ({ hideSwitchTools }) => {
const NavBar = ({ hideSwitchTools, profileUrl }) => {
// all menu options
const menu = useSelector((state) => state.menu.categories);
// flat list of all apps
Expand Down Expand Up @@ -96,6 +96,7 @@ const NavBar = ({ hideSwitchTools }) => {
<Fragment>
<NotificationsMenu />
<UserMenu
profileUrl={profileUrl}
profile={auth.profile}
hideSwitchTools={hideSwitchTools}
/>
Expand All @@ -121,6 +122,7 @@ const NavBar = ({ hideSwitchTools }) => {
<Fragment>
<NotificationsMenu />
<UserMenu
profileUrl={profileUrl}
profile={auth.profile}
hideSwitchTools={hideSwitchTools}
/>
Expand All @@ -140,9 +142,11 @@ const NavBar = ({ hideSwitchTools }) => {

NavBar.defaultProps = {
hideSwitchTools: false,
profileUrl: '/profile/',
};

NavBar.propTypes = {
profileUrl: PropTypes.string,
hideSwitchTools: PropTypes.boolean,
};

Expand Down
112 changes: 0 additions & 112 deletions src/components/SelfService/NavBar/index.jsx

This file was deleted.

92 changes: 0 additions & 92 deletions src/components/SelfService/NavBar/styles.css

This file was deleted.

21 changes: 0 additions & 21 deletions src/components/SelfService/NotificationsMenu/index.jsx

This file was deleted.

38 changes: 0 additions & 38 deletions src/components/SelfService/NotificationsMenu/styles.module.scss

This file was deleted.

Loading