Skip to content

Fixed Zurich navi #3563

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions src/server/tc-communities/zurich/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,28 @@
"url": "https://www.topcoder.com"
}],
"footerText": "© Copyright Topcoder, 2019",
"menuItems": [{
"navigationMenu": "2rUBPkaTK3UInCz4h7GOZG",
"spaceName": "zurich"
}],
"menuItems": [
{
"title": "Home",
"url": "/"
}, {
"title": "How it works",
"url": "/learn"
}, {
"title": "Catalog",
"url": "/catalog"
}, {
"title": "FAQ",
"url": "/faq"
}, {
"title": "Challenges",
"url": "/challenges?communityId=zurich"
}, {
"title": "THRIVE/LEARN",
"url": "https://topcoder.com/thrive",
"openNewTab": true
}
],
"hideSearch": true,
"newsFeed": "http://www.topcoder.com/feed",
"subdomains": ["zurich", "community-zurich"],
Expand Down
21 changes: 9 additions & 12 deletions src/shared/routes/Communities/Zurich/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { connect } from 'react-redux';
import Error404 from 'components/Error404';
import FAQ from 'components/tc-communities/communities/zurich/FAQ';
import Footer from 'components/tc-communities/communities/zurich/Footer';
import Header from 'containers/tc-communities/Header';
import Home from 'containers/tc-communities/zurich/Home';
import Learn from 'components/tc-communities/communities/zurich/Learn';
import ContentfulRoute from 'components/Contentful/Route';
Expand All @@ -21,8 +22,8 @@ import React from 'react';
import theme from 'components/tc-communities/communities/zurich/theme';
import { ThemeProvider } from 'react-css-super-themr';
import { Route, Switch, Redirect } from 'react-router-dom';
import { config } from 'topcoder-react-utils';
import Viewport from 'components/Contentful/Viewport';
import ContentfulMenu from 'components/Contentful/Menu';

function Zurich({ base, meta, userGroups }) {
// Only members of `Requestor`|`Approver` gropus
Expand Down Expand Up @@ -64,19 +65,15 @@ function Zurich({ base, meta, userGroups }) {
path={`${base}/forbidden`}
/>
<Route
component={() => (
component={({ match }) => (
<ThemeProvider theme={theme}>
<div>
{
meta.menuItems ? (
<ContentfulMenu
id={meta.menuItems[0].navigationMenu}
spaceName={meta.menuItems[0].spaceName}
environment={meta.menuItems[0].environment}
baseUrl={base}
/>
) : null
}
<Header
baseUrl={base}
pageId={match.params.pageId || 'home'}
hideJoinNow
logoutRedirect={config.URL.COMMUNITIES.ZURICH}
/>
<Switch>
<Route
component={() => ChallengeListing({
Expand Down