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

TaaS App Navbar Updates #8

Merged
merged 2 commits into from
Dec 11, 2020
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
"dependencies": {
"@reach/router": "^1.3.4",
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.1",
"tc-auth-lib": "topcoder-platform/tc-auth-lib#1.0.3",
"browser-cookies": "^1.2.0",
"classnames": "^2.2.6",
"config": "^3.3.2",
Expand Down
8 changes: 5 additions & 3 deletions src/components/NavLink/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ import React from "react";
import { Link } from "@reach/router";
import cn from "classnames";

const NavLink = ({ to, className, activeClassName, children }) => (
const NavLink = ({ to, className, activeClassName, children, exact }) => (
<Link
to={to}
getProps={({ isCurrent }) => {
getProps={({ isCurrent, isPartiallyCurrent }) => {
// the object returned here is passed to the
// anchor element's props
return {
className: cn(className, { [activeClassName]: isCurrent }),
className: cn(className, {
[activeClassName]: exact ? isCurrent : isPartiallyCurrent,
}),
};
}}
>
Expand Down
20 changes: 1 addition & 19 deletions src/constants/apps.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,14 @@ export const APP_CATEGORIES = [
{
title: "TaaS",
icon: appTaasIcon,
path: "/taas",
path: "/taas/myteams",
menu: [
{
title: "My Teams",
path: "/taas/myteams",
icon: myteamsIcon,
activeIcon: myteamsGreenIcon,
},
{
title: "Feedback",
path: "/taas/feedback",
icon: discussionsIcon,
activeIcon: discussionsGreenIcon,
},
{
title: "Invoices",
path: "/taas/invoices",
icon: apisIcon,
activeIcon: apisGreenIcon,
},
{
title: "Reports",
path: "/taas/reports",
icon: reportsIcon,
activeIcon: reportsGreenIcon,
},
],
},
{
Expand Down