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

Commit b1b831e

Browse files
authored
Merge pull request #21 from mbaghel/dev
Update sidenav for Role & Skills Intake in Taas-App
2 parents 77dbb3e + ea7310a commit b1b831e

File tree

5 files changed

+89
-39
lines changed

5 files changed

+89
-39
lines changed

server.js

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
/* global process */
2-
const express = require("express");
2+
const express = require('express');
33

44
const app = express();
55

6-
app.use('/navbar',
7-
express.static("./dist", {
6+
app.use(
7+
'/navbar',
8+
express.static('./dist', {
89
setHeaders: function setHeaders(res) {
9-
res.header("Access-Control-Allow-Origin", "*");
10-
res.header("Access-Control-Allow-Methods", "GET");
10+
res.header('Access-Control-Allow-Origin', '*');
11+
res.header('Access-Control-Allow-Methods', 'GET');
1112
res.header(
12-
"Access-Control-Allow-Headers",
13-
"Origin, X-Requested-With, Content-Type, Accept"
13+
'Access-Control-Allow-Headers',
14+
'Origin, X-Requested-With, Content-Type, Accept'
1415
);
1516
},
1617
})
1718
);
1819

1920
app.get('/', function (req, res) {
20-
res.send('alive')
21-
})
21+
res.send('alive');
22+
});
2223

2324
const PORT = process.env.PORT || 3001;
2425
app.listen(PORT, '0.0.0.0');
+15
Loading

src/assets/images/create-team.svg

+15
Loading

src/components/Menu/index.jsx

+21-12
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
*
44
* General component to show menu with submenu.
55
*/
6-
import React, { Fragment, useCallback, useState } from "react";
7-
import { useLocation } from "@reach/router";
8-
import cn from "classnames";
9-
import { includes, map } from "lodash";
10-
import NavLink from "../NavLink";
11-
import "./styles.css";
6+
import React, { Fragment, useCallback, useState } from 'react';
7+
import { useLocation } from '@reach/router';
8+
import cn from 'classnames';
9+
import { includes, map } from 'lodash';
10+
import NavLink from '../NavLink';
11+
import './styles.css';
1212

1313
const SubMenu = ({ option }) => {
1414
const location = useLocation();
1515

1616
const [isOpen, setIsOpen] = useState(
17-
includes(map(option.children, "path"), location.pathname)
17+
includes(map(option.children, 'path'), location.pathname)
1818
);
1919

2020
const toggleOpen = useCallback(() => {
@@ -24,8 +24,8 @@ const SubMenu = ({ option }) => {
2424
return (
2525
<>
2626
<span
27-
className={cn("menu-link menu-link-toggle", {
28-
"menu-link-toggle-up": isOpen,
27+
className={cn('menu-link menu-link-toggle', {
28+
'menu-link-toggle-up': isOpen,
2929
})}
3030
onClick={toggleOpen}
3131
role="button"
@@ -62,10 +62,19 @@ const Menu = ({ options, sidebarCollapsed }) => (
6262
to={option.path}
6363
activeClassName="menu-link-active"
6464
className="menu-link"
65+
exact={option.isExact}
6566
>
66-
<img src={option.activeIcon} className="subroute-icon active-icon" alt="Subroute Icon"/>
67-
<img src={option.icon} className="subroute-icon gray-icon" alt="Subroute Icon"/>
68-
{!sidebarCollapsed ? option.title : ''}
67+
<img
68+
src={option.activeIcon}
69+
className="subroute-icon active-icon"
70+
alt="Subroute Icon"
71+
/>
72+
<img
73+
src={option.icon}
74+
className="subroute-icon gray-icon"
75+
alt="Subroute Icon"
76+
/>
77+
{!sidebarCollapsed ? option.title : ''}
6978
</NavLink>
7079
</Fragment>
7180
) : (

0 commit comments

Comments
 (0)