Skip to content

Commit 47b1c80

Browse files
Merge pull request #2621 from rashmi73/issue_2542
Fix Issue #2542
2 parents a157b32 + e5d780a commit 47b1c80

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/shared/components/Header/index.jsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import _ from 'lodash';
2-
import React, { useState } from 'react';
2+
import React, { useState, useEffect } from 'react';
33
import PT from 'prop-types';
44
import { config } from 'topcoder-react-utils';
55
import Logo from 'assets/images/tc-logo.svg';
@@ -18,6 +18,7 @@ try {
1818

1919
const Header = ({ profile }) => {
2020
const [activeLevel1Id, setActiveLevel1Id] = useState();
21+
const [path, setPath] = useState();
2122
const [openMore, setOpenMore] = useState(true);
2223

2324
const handleChangeLevel1Id = (menuId) => {
@@ -44,6 +45,9 @@ const Header = ({ profile }) => {
4445
normalizedProfile = null;
4546
}
4647

48+
useEffect(() => {
49+
setPath(window.location.pathname);
50+
}, []);
4751
if (TopNavRef) {
4852
return (
4953
<div>
@@ -67,6 +71,7 @@ const Header = ({ profile }) => {
6771
theme={config.HEADER_MENU_THEME}
6872
currentLevel1Id={activeLevel1Id}
6973
onChangeLevel1Id={handleChangeLevel1Id}
74+
path={path}
7075
openMore={openMore}
7176
setOpenMore={handleChangeOpenMore}
7277
/>

0 commit comments

Comments
 (0)