Skip to content

Commit 8a554a7

Browse files
committed
Changes to allow for switching of type for Thrive
1 parent f772988 commit 8a554a7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/shared/containers/TopcoderHeader.jsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,17 @@ const TopcoderHeader = ({ auth }) => {
3636

3737
const regSource = window.location.pathname.split('/')[1];
3838
const retUrl = encodeURIComponent(window.location.href);
39+
const urlParams = new URLSearchParams(window.location.href);
40+
41+
let { type } = getSubPageConfiguration();
42+
43+
// If url contains navTool url parameter. Overwrite settings with parameter.
44+
if (urlParams.get('navTool')) {
45+
type = urlParams.get('navTool');
46+
}
47+
3948
tcUniNav('init', `headerNav-${headerId}`, {
40-
type: getSubPageConfiguration().type,
49+
type,
4150
toolName: getSubPageConfiguration().toolName,
4251
toolRoot: getSubPageConfiguration().toolRoot,
4352
user: isAuthenticated ? navigationUserInfo : null,

0 commit comments

Comments
 (0)