Skip to content

Topgear Redirect #5555

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 4 commits into from
Jun 1, 2021
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
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ workflows:
branches:
only:
- develop
- topgear-app
# This is alternate dev env for parallel testing
- deployTest:
context : org-global
Expand Down Expand Up @@ -361,6 +362,7 @@ workflows:
branches:
only:
- develop
- topgear-app
# Production builds are exectuted
# when PR is merged to the master
# Don't change anything in this configuration
Expand Down
7 changes: 0 additions & 7 deletions src/server/tc-communities/wipro/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,13 @@
"menuItems": [
{
"title": "Home",
"url": "/"
}, {
"title": "TopGear Operations",
"openNewTab": true,
"url": "https://topgear-app.wipro.com"
}, {
"title": "Challenges",
"url": "/challenges"
}, {
"title": "Leaderboard",
"url": "/leaderboard"
}, {
"title": "FAQ",
"url": "https://topgear-app.wipro.com/faq-categories"
}
],
"newsFeed": "http://www.topcoder.com/feed",
Expand Down
5 changes: 2 additions & 3 deletions src/shared/containers/tc-communities/Loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ class Loader extends React.Component {
* clear, what exactly do we need to support it in general. */
if ((communityId === 'wipro' || communityId === 'comcast') && !visitorGroups) {
const returnUrl = encodeURIComponent(window.location.href);
let subpath = 'member';
if (communityId === 'wipro') {
subpath = 'sso-login/';
window.location = `${config.URL.AUTH}/?retUrl=${config.URL.TOPGEAR}`;
}
window.location = `${config.URL.AUTH}/${subpath}?retUrl=${returnUrl}&utm_source=${communityId}`;
window.location = `${config.URL.AUTH}/member?retUrl=${returnUrl}&utm_source=${communityId}`;
}
}

Expand Down
15 changes: 13 additions & 2 deletions src/shared/routes/Communities/Wipro/Routes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ChallengeDetails from 'routes/ChallengeDetails';
import ChallengeListing from 'routes/Communities/ChallengeListing';
import ChallengeListingBanner from 'components/tc-communities/communities/wipro/ChallengeListingBanner';
import ContentfulRoute from 'components/Contentful/Route';
// import ContentfulRoute from 'components/Contentful/Route';
import Header from 'containers/tc-communities/Header';
import LeaderboardBanner from 'components/tc-communities/communities/wipro/LeaderboardBanner';
import PT from 'prop-types';
Expand All @@ -20,7 +20,7 @@ import Viewport from 'components/Contentful/Viewport';
import theme from 'components/tc-communities/communities/wipro/theme';
import { ThemeProvider } from 'react-css-super-themr';
import { Route, Switch } from 'react-router-dom';
import { config } from 'topcoder-react-utils';
import { config, isomorphy } from 'topcoder-react-utils';

import Leaderboard from '../Leaderboard';

Expand Down Expand Up @@ -115,11 +115,22 @@ export default function Wipro({ base, meta }) {
exact
path={`${base}/leaderboard`}
/>
{/*
<ContentfulRoute
baseUrl={base}
id="1VXRAIxJdi6eCeeyKCmicK"
spaceName="topgear"
/>
*/}
<Route
path={base}
component={() => {
if (isomorphy.isClientSide()) {
window.location = config.URL.TOPGEAR;
}
return null;
}}
/>
</Switch>
<Viewport
id="2rJCDsGCHTDygyx4dqxlNq"
Expand Down