Skip to content

Commit f476743

Browse files
authored
Merge pull request #3563 from topcoder-platform/develop
Fixed Zurich navi
2 parents 2b14711 + 103fd7e commit f476743

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

src/server/tc-communities/zurich/metadata.json

+22-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,28 @@
2222
"url": "https://www.topcoder.com"
2323
}],
2424
"footerText": "© Copyright Topcoder, 2019",
25-
"menuItems": [{
26-
"navigationMenu": "2rUBPkaTK3UInCz4h7GOZG",
27-
"spaceName": "zurich"
28-
}],
25+
"menuItems": [
26+
{
27+
"title": "Home",
28+
"url": "/"
29+
}, {
30+
"title": "How it works",
31+
"url": "/learn"
32+
}, {
33+
"title": "Catalog",
34+
"url": "/catalog"
35+
}, {
36+
"title": "FAQ",
37+
"url": "/faq"
38+
}, {
39+
"title": "Challenges",
40+
"url": "/challenges?communityId=zurich"
41+
}, {
42+
"title": "THRIVE/LEARN",
43+
"url": "https://topcoder.com/thrive",
44+
"openNewTab": true
45+
}
46+
],
2947
"hideSearch": true,
3048
"newsFeed": "http://www.topcoder.com/feed",
3149
"subdomains": ["zurich", "community-zurich"],

src/shared/routes/Communities/Zurich/Routes.jsx

+9-12
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { connect } from 'react-redux';
1313
import Error404 from 'components/Error404';
1414
import FAQ from 'components/tc-communities/communities/zurich/FAQ';
1515
import Footer from 'components/tc-communities/communities/zurich/Footer';
16+
import Header from 'containers/tc-communities/Header';
1617
import Home from 'containers/tc-communities/zurich/Home';
1718
import Learn from 'components/tc-communities/communities/zurich/Learn';
1819
import ContentfulRoute from 'components/Contentful/Route';
@@ -21,8 +22,8 @@ import React from 'react';
2122
import theme from 'components/tc-communities/communities/zurich/theme';
2223
import { ThemeProvider } from 'react-css-super-themr';
2324
import { Route, Switch, Redirect } from 'react-router-dom';
25+
import { config } from 'topcoder-react-utils';
2426
import Viewport from 'components/Contentful/Viewport';
25-
import ContentfulMenu from 'components/Contentful/Menu';
2627

2728
function Zurich({ base, meta, userGroups }) {
2829
// Only members of `Requestor`|`Approver` gropus
@@ -64,19 +65,15 @@ function Zurich({ base, meta, userGroups }) {
6465
path={`${base}/forbidden`}
6566
/>
6667
<Route
67-
component={() => (
68+
component={({ match }) => (
6869
<ThemeProvider theme={theme}>
6970
<div>
70-
{
71-
meta.menuItems ? (
72-
<ContentfulMenu
73-
id={meta.menuItems[0].navigationMenu}
74-
spaceName={meta.menuItems[0].spaceName}
75-
environment={meta.menuItems[0].environment}
76-
baseUrl={base}
77-
/>
78-
) : null
79-
}
71+
<Header
72+
baseUrl={base}
73+
pageId={match.params.pageId || 'home'}
74+
hideJoinNow
75+
logoutRedirect={config.URL.COMMUNITIES.ZURICH}
76+
/>
8077
<Switch>
8178
<Route
8279
component={() => ChallengeListing({

0 commit comments

Comments
 (0)