diff --git a/server.js b/server.js index 30eb854..a3a9ffc 100644 --- a/server.js +++ b/server.js @@ -1,24 +1,25 @@ /* global process */ -const express = require("express"); +const express = require('express'); const app = express(); -app.use('/navbar', - express.static("./dist", { +app.use( + '/navbar', + express.static('./dist', { setHeaders: function setHeaders(res) { - res.header("Access-Control-Allow-Origin", "*"); - res.header("Access-Control-Allow-Methods", "GET"); + res.header('Access-Control-Allow-Origin', '*'); + res.header('Access-Control-Allow-Methods', 'GET'); res.header( - "Access-Control-Allow-Headers", - "Origin, X-Requested-With, Content-Type, Accept" + 'Access-Control-Allow-Headers', + 'Origin, X-Requested-With, Content-Type, Accept' ); }, }) ); app.get('/', function (req, res) { - res.send('alive') -}) + res.send('alive'); +}); const PORT = process.env.PORT || 3001; app.listen(PORT, '0.0.0.0'); diff --git a/src/assets/images/create-team-green.svg b/src/assets/images/create-team-green.svg new file mode 100644 index 0000000..abab467 --- /dev/null +++ b/src/assets/images/create-team-green.svg @@ -0,0 +1,15 @@ + + + 08E95137-2037-4B8F-91FD-731B926A951E + + + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/create-team.svg b/src/assets/images/create-team.svg new file mode 100644 index 0000000..38dd31f --- /dev/null +++ b/src/assets/images/create-team.svg @@ -0,0 +1,15 @@ + + + 08E95137-2037-4B8F-91FD-731B926A951E + + + + + + + + + + + + diff --git a/src/components/Menu/index.jsx b/src/components/Menu/index.jsx index 96f75d3..13e0352 100644 --- a/src/components/Menu/index.jsx +++ b/src/components/Menu/index.jsx @@ -3,18 +3,18 @@ * * General component to show menu with submenu. */ -import React, { Fragment, useCallback, useState } from "react"; -import { useLocation } from "@reach/router"; -import cn from "classnames"; -import { includes, map } from "lodash"; -import NavLink from "../NavLink"; -import "./styles.css"; +import React, { Fragment, useCallback, useState } from 'react'; +import { useLocation } from '@reach/router'; +import cn from 'classnames'; +import { includes, map } from 'lodash'; +import NavLink from '../NavLink'; +import './styles.css'; const SubMenu = ({ option }) => { const location = useLocation(); const [isOpen, setIsOpen] = useState( - includes(map(option.children, "path"), location.pathname) + includes(map(option.children, 'path'), location.pathname) ); const toggleOpen = useCallback(() => { @@ -24,8 +24,8 @@ const SubMenu = ({ option }) => { return ( <> ( to={option.path} activeClassName="menu-link-active" className="menu-link" + exact={option.isExact} > - Subroute Icon - Subroute Icon - {!sidebarCollapsed ? option.title : ''} + Subroute Icon + Subroute Icon + {!sidebarCollapsed ? option.title : ''} ) : ( diff --git a/src/constants/apps.js b/src/constants/apps.js index 12cd5b7..8bdf24e 100644 --- a/src/constants/apps.js +++ b/src/constants/apps.js @@ -1,43 +1,53 @@ /** * Config for the All Apps menu. */ -import appDocumentationIcon from "../assets/images/learn.svg"; -import appTaasIcon from "../assets/images/integrations.svg"; -import myteamsIcon from "../assets/images/my-teams.svg"; -import myteamsGreenIcon from "../assets/images/my-teams-green.svg"; +import appDocumentationIcon from '../assets/images/learn.svg'; +import appTaasIcon from '../assets/images/integrations.svg'; +import myteamsIcon from '../assets/images/my-teams.svg'; +import myteamsGreenIcon from '../assets/images/my-teams-green.svg'; +import createTeamIcon from '../assets/images/create-team.svg'; +import createTeamGreenIcon from '../assets/images/create-team-green.svg'; /** * Micro-app categories */ export const APP_CATEGORIES = [ { - category: "Manage", + category: 'Manage', apps: [ { - title: "TaaS", + title: 'TaaS', icon: appTaasIcon, - path: "/taas/myteams", + path: '/taas/myteams', menu: [ { - title: "My Teams", - path: "/taas/myteams", + title: 'My Teams', + path: '/taas/myteams', icon: myteamsIcon, activeIcon: myteamsGreenIcon, + isExact: true, + }, + { + title: 'Create New Team', + path: '/taas/myteams/createnewteam', + icon: createTeamIcon, + activeIcon: createTeamGreenIcon, + isExact: false, }, ], }, { - title: "Documentation", + title: 'Documentation', icon: appDocumentationIcon, - path: "/model", - menu: [] + path: '/model', + menu: [], }, { - title: "Community Admin", + title: 'Community Admin', icon: myteamsIcon, - path: "/community-admin", - menu: [] - } - ] - } + path: '/community-admin', + menu: [], + }, + ], + }, ];