Skip to content

Commit aca25b6

Browse files
committed
Merge branch 'universal_nav' into develop
2 parents a4fb946 + fe39444 commit aca25b6

File tree

1 file changed

+5
-2
lines changed
  • src/shared/containers/TopcoderHeader

1 file changed

+5
-2
lines changed

src/shared/containers/TopcoderHeader/index.jsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,15 @@ const TopcoderHeader = ({ auth }) => {
3030

3131
// if there's a stored nav type in session storage, retrieve it and overwrite type
3232
const sessionNavType = sessionStorage.getItem('uni-nav[navType]');
33-
if (sessionNavType && (sessionNavType === 'tool' || sessionNavType === 'marketing')) {
33+
const url = new URL(window.location.href);
34+
35+
// Only use the set sessionStorage value for navType on the /thrive paths, for now.
36+
// Probably will change in the future...
37+
if (window.location.href.indexOf('/thrive') > -1 && sessionNavType && (sessionNavType === 'tool' || sessionNavType === 'marketing')) {
3438
type = sessionNavType;
3539
}
3640

3741
// If url contains navTool url parameter. Overwrite settings with parameter.
38-
const url = new URL(window.location.href);
3942
const urlParams = new URLSearchParams(url.search);
4043
if (urlParams.get('navTool')) {
4144
type = urlParams.get('navTool');

0 commit comments

Comments
 (0)