Skip to content

Commit a1d4d92

Browse files
Merge pull request #5555 from topcoder-platform/topgear-app
Topgear Redirect
2 parents 19e55fc + a6a590a commit a1d4d92

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ workflows:
341341
branches:
342342
only:
343343
- develop
344+
- topgear-app
344345
# This is alternate dev env for parallel testing
345346
- "build-test":
346347
context : org-global
@@ -369,6 +370,7 @@ workflows:
369370
branches:
370371
only:
371372
- develop
373+
- topgear-app
372374
# Production builds are exectuted
373375
# when PR is merged to the master
374376
# Don't change anything in this configuration

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,13 @@
2929
"menuItems": [
3030
{
3131
"title": "Home",
32-
"url": "/"
33-
}, {
34-
"title": "TopGear Operations",
35-
"openNewTab": true,
3632
"url": "https://topgear-app.wipro.com"
3733
}, {
3834
"title": "Challenges",
3935
"url": "/challenges"
4036
}, {
4137
"title": "Leaderboard",
4238
"url": "/leaderboard"
43-
}, {
44-
"title": "FAQ",
45-
"url": "https://topgear-app.wipro.com/faq-categories"
4639
}
4740
],
4841
"newsFeed": "http://www.topcoder.com/feed",

src/shared/containers/tc-communities/Loader.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ class Loader extends React.Component {
5151
* clear, what exactly do we need to support it in general. */
5252
if ((communityId === 'wipro' || communityId === 'comcast') && !visitorGroups) {
5353
const returnUrl = encodeURIComponent(window.location.href);
54-
let subpath = 'member';
5554
if (communityId === 'wipro') {
56-
subpath = 'sso-login/';
55+
window.location = `${config.URL.AUTH}/?retUrl=${config.URL.TOPGEAR}`;
5756
}
58-
window.location = `${config.URL.AUTH}/${subpath}?retUrl=${returnUrl}&utm_source=${communityId}`;
57+
window.location = `${config.URL.AUTH}/member?retUrl=${returnUrl}&utm_source=${communityId}`;
5958
}
6059
}
6160

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import ChallengeDetails from 'routes/ChallengeDetails';
66
import ChallengeListing from 'routes/Communities/ChallengeListing';
77
import ChallengeListingBanner from 'components/tc-communities/communities/wipro/ChallengeListingBanner';
8-
import ContentfulRoute from 'components/Contentful/Route';
8+
// import ContentfulRoute from 'components/Contentful/Route';
99
import Header from 'containers/tc-communities/Header';
1010
import LeaderboardBanner from 'components/tc-communities/communities/wipro/LeaderboardBanner';
1111
import PT from 'prop-types';
@@ -20,7 +20,7 @@ import Viewport from 'components/Contentful/Viewport';
2020
import theme from 'components/tc-communities/communities/wipro/theme';
2121
import { ThemeProvider } from 'react-css-super-themr';
2222
import { Route, Switch } from 'react-router-dom';
23-
import { config } from 'topcoder-react-utils';
23+
import { config, isomorphy } from 'topcoder-react-utils';
2424

2525
import Leaderboard from '../Leaderboard';
2626

@@ -115,11 +115,22 @@ export default function Wipro({ base, meta }) {
115115
exact
116116
path={`${base}/leaderboard`}
117117
/>
118+
{/*
118119
<ContentfulRoute
119120
baseUrl={base}
120121
id="1VXRAIxJdi6eCeeyKCmicK"
121122
spaceName="topgear"
122123
/>
124+
*/}
125+
<Route
126+
path={base}
127+
component={() => {
128+
if (isomorphy.isClientSide()) {
129+
window.location = config.URL.TOPGEAR;
130+
}
131+
return null;
132+
}}
133+
/>
123134
</Switch>
124135
<Viewport
125136
id="2rJCDsGCHTDygyx4dqxlNq"

0 commit comments

Comments
 (0)