Skip to content

Commit 5f672af

Browse files
Merge pull request #5566 from topcoder-platform/topgear-redirect
(hotfix) TopGear redirect
2 parents a1d4d92 + f4f9ed0 commit 5f672af

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ workflows:
341341
branches:
342342
only:
343343
- develop
344-
- topgear-app
344+
- topgear-redirect
345345
# This is alternate dev env for parallel testing
346346
- "build-test":
347347
context : org-global
@@ -370,7 +370,7 @@ workflows:
370370
branches:
371371
only:
372372
- develop
373-
- topgear-app
373+
- topgear-redirect
374374
# Production builds are exectuted
375375
# when PR is merged to the master
376376
# Don't change anything in this configuration

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class Loader extends React.Component {
5656
}
5757
window.location = `${config.URL.AUTH}/member?retUrl=${returnUrl}&utm_source=${communityId}`;
5858
}
59+
60+
/* Redirect odl TopGear home to new TopGear App */
61+
if (communityId === 'wipro'
62+
&& (window.location.pathname === '/' || window.location.pathname === '/__community__/wipro')) {
63+
window.location = config.URL.TOPGEAR;
64+
}
5965
}
6066

6167
render() {

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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, isomorphy } from 'topcoder-react-utils';
23+
import { config } from 'topcoder-react-utils';
2424

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

@@ -122,15 +122,6 @@ export default function Wipro({ base, meta }) {
122122
spaceName="topgear"
123123
/>
124124
*/}
125-
<Route
126-
path={base}
127-
component={() => {
128-
if (isomorphy.isClientSide()) {
129-
window.location = config.URL.TOPGEAR;
130-
}
131-
return null;
132-
}}
133-
/>
134125
</Switch>
135126
<Viewport
136127
id="2rJCDsGCHTDygyx4dqxlNq"

0 commit comments

Comments
 (0)