From 464d050bcaf4850342199899ca29632a9bbe2dc8 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Thu, 24 Aug 2023 06:41:36 +1000 Subject: [PATCH 1/6] Redirects from legacy to new platform-UI apps --- .../Filters/ChallengeFilters.jsx | 2 - .../Filters/FiltersPanel.jsx | 2 - .../challenge-listing/FilterPanel.jsx | 17 -------- .../containers/challenge-listing/Listing.jsx | 2 - config/default.js | 1 + config/production.js | 1 + src/shared/actions/challenge-listing/index.js | 14 ------ .../Filters/FiltersPanel/index.jsx | 5 +-- .../challenge-listing/FilterPanel.jsx | 11 ----- .../challenge-listing/Listing/index.jsx | 5 --- .../reducers/challenge-listing/index.js | 22 ---------- .../routes/Communities/Blockchain/Routes.jsx | 11 ----- src/shared/routes/Communities/CS/Routes.jsx | 11 ----- .../routes/Communities/Comcast/Routes.jsx | 11 ----- .../routes/Communities/Community2/Routes.jsx | 16 ------- .../routes/Communities/DemoExpert/Routes.jsx | 16 ------- .../routes/Communities/Mobile/Routes.jsx | 6 --- src/shared/routes/Communities/QA/Routes.jsx | 16 ------- src/shared/routes/Communities/SRMx/Routes.jsx | 16 ------- .../routes/Communities/TCO01/Routes.jsx | 6 --- .../routes/Communities/TCO02/Routes.jsx | 6 --- .../routes/Communities/TCO03/Routes.jsx | 6 --- .../routes/Communities/TCO04/Routes.jsx | 6 --- .../routes/Communities/TCO05/Routes.jsx | 6 --- .../routes/Communities/TCO06/Routes.jsx | 6 --- .../routes/Communities/TCO07/Routes.jsx | 6 --- .../routes/Communities/TCO08/Routes.jsx | 6 --- .../routes/Communities/TCO09/Routes.jsx | 6 --- .../routes/Communities/TCO10/Routes.jsx | 6 --- .../routes/Communities/TCO11/Routes.jsx | 6 --- .../routes/Communities/TCO12/Routes.jsx | 6 --- .../routes/Communities/TCO13/Routes.jsx | 6 --- .../routes/Communities/TCO14/Routes.jsx | 6 --- .../routes/Communities/TCO15/Routes.jsx | 6 --- .../routes/Communities/TCO16/Routes.jsx | 6 --- .../routes/Communities/TCO17/Routes.jsx | 6 --- .../routes/Communities/TCO18/Routes.jsx | 6 --- .../routes/Communities/TCO19/Routes.jsx | 6 --- .../routes/Communities/TCO20/Routes.jsx | 6 --- .../routes/Communities/TCO21/Routes.jsx | 11 ----- .../routes/Communities/TCO22/Routes.jsx | 11 ----- .../routes/Communities/TCO23/Routes.jsx | 11 ----- .../routes/Communities/TaskForce/Routes.jsx | 6 --- .../Communities/TcProdDev/Routes/index.jsx | 16 ------- .../routes/Communities/Veterans/Routes.jsx | 11 ----- .../routes/Communities/Wipro/Routes.jsx | 25 ----------- .../routes/Communities/Zurich/Routes.jsx | 16 ------- src/shared/routes/Communities/iot/Routes.jsx | 16 ------- src/shared/routes/RedirectMemberSearch.jsx | 27 ++++++++++++ src/shared/routes/Topcoder/Routes.jsx | 6 --- src/shared/routes/index.jsx | 43 +++++++++++++------ 51 files changed, 61 insertions(+), 443 deletions(-) create mode 100644 src/shared/routes/RedirectMemberSearch.jsx diff --git a/__tests__/shared/components/challenge-listing/Filters/ChallengeFilters.jsx b/__tests__/shared/components/challenge-listing/Filters/ChallengeFilters.jsx index e4da10e8af..da8f44066d 100644 --- a/__tests__/shared/components/challenge-listing/Filters/ChallengeFilters.jsx +++ b/__tests__/shared/components/challenge-listing/Filters/ChallengeFilters.jsx @@ -38,7 +38,6 @@ afterAll(() => { // setSearchText, // showTrackModal, // trackModalShown: true, -// validKeywords: [''], // validTypes: [''], // }, { // challengeGroupId: '1', @@ -60,7 +59,6 @@ afterAll(() => { // setSearchText, // showTrackModal, // trackModalShown: true, -// validKeywords: [''], // validTypes: [''], // }]; diff --git a/__tests__/shared/components/challenge-listing/Filters/FiltersPanel.jsx b/__tests__/shared/components/challenge-listing/Filters/FiltersPanel.jsx index f9831b01a8..95ba08e495 100644 --- a/__tests__/shared/components/challenge-listing/Filters/FiltersPanel.jsx +++ b/__tests__/shared/components/challenge-listing/Filters/FiltersPanel.jsx @@ -31,7 +31,6 @@ const mockDatas = [{ setFilterState, setSearchText, activeBucket: 'all', - validKeywords: ['key', 'word'], validTypes: [{ name: 'sub', subTrack: 'sub' }, { name: 'track', subTrack: 'track' }], onClose, }, { @@ -55,7 +54,6 @@ const mockDatas = [{ selectedCommunityId: '1', setFilterState, setSearchText, - validKeywords: [], validTypes: [], onClose, }]; diff --git a/__tests__/shared/containers/challenge-listing/FilterPanel.jsx b/__tests__/shared/containers/challenge-listing/FilterPanel.jsx index 399355d7a7..9a42be8f03 100644 --- a/__tests__/shared/containers/challenge-listing/FilterPanel.jsx +++ b/__tests__/shared/containers/challenge-listing/FilterPanel.jsx @@ -23,9 +23,7 @@ describe('shallow render connnected component', () => { }, communityFilters: [], filter: {}, - loadingChallengeTags: false, loadingChallengeTypes: false, - challengeTags: [], challengeTypes: [], selectedCommunityId: '1', }, @@ -69,14 +67,11 @@ describe('shallow render connnected component', () => { // communityFilters: [], // filterState: {}, // getAvailableFilterName: jest.fn(), -// loadingKeywords: false, // loadingTypes: false, -// validKeywords: [], // validTypes: [], // selectedCommunityId: '1', // tokenV2: 'tokenV2', // getTypes: jest.fn(), -// getKeywords: jest.fn(), // saveFilter: jest.fn(), // selectBucket: jest.fn(), // selectCommunity: jest.fn(), @@ -112,7 +107,6 @@ describe('shallow render connnected component', () => { // test('load data if not loading', () => { // instance = mount(); // expect(initialProps.getTypes).toHaveBeenCalledTimes(1); -// expect(initialProps.getKeywords).toHaveBeenCalledTimes(1); // }); // test('do not load data if loading', () => { @@ -120,11 +114,9 @@ describe('shallow render connnected component', () => { // {...initialProps} // challengeGroupId="1" // loadingTypes -// loadingKeywords // />); // expect(initialProps.getTypes).toHaveBeenCalledTimes(0); -// expect(initialProps.getKeywords).toHaveBeenCalledTimes(0); // }); // test.skip('saveFilter', () => { @@ -182,9 +174,7 @@ describe('shallow render connnected component', () => { // }, // communityFilters: [], // filter: {}, -// loadingChallengeTags: true, // loadingChallengeTypes: true, -// challengeTags: [], // challengeTypes: [], // selectedCommunityId: '1', // }, @@ -232,13 +222,6 @@ describe('shallow render connnected component', () => { // expect(actions[1].type).toEqual(cActions.challengeListing.getChallengeTypesDone.toString()); // }); -// test('getKeywords', () => { -// filterPanel.prop('getKeywords')(); -// const actions = store.getActions(); -// expect(actions[0].type).toEqual(cActions.challengeListing.getChallengeTagsInit.toString()); -// expect(actions[1].type).toEqual(cActions.challengeListing.getChallengeTagsDone.toString()); -// }); - // test.skip('saveFilter', () => { // filterPanel.prop('saveFilter')(); // const actions = store.getActions(); diff --git a/__tests__/shared/containers/challenge-listing/Listing.jsx b/__tests__/shared/containers/challenge-listing/Listing.jsx index 571f11b5b6..a64831dc61 100644 --- a/__tests__/shared/containers/challenge-listing/Listing.jsx +++ b/__tests__/shared/containers/challenge-listing/Listing.jsx @@ -41,7 +41,6 @@ describe('full render pure component', () => { allPastChallengesLoaded: false, challenges: [], challengeTypes: [], - challengeTags: [], getCommunitiesList: () => {}, communityFilters: [{ communityId: '1', name: 'My Filter', filter: {} }], dropChallenges: jest.fn(), @@ -178,7 +177,6 @@ describe('full render connnected component and dispatch actions', () => { allPastChallengesLoaded: false, challenges: [{ id: '1' }], challengeTypes: [], - challengeTags: [], // communityFilters: [{ id: '1', name: 'My Filter', filter: {} }], dropChallenges: jest.fn(), filter: {}, diff --git a/config/default.js b/config/default.js index 8bbedb09fd..3ba54a68db 100644 --- a/config/default.js +++ b/config/default.js @@ -474,6 +474,7 @@ module.exports = { /* development id - makes surveys have warning about environment */ UNIVERSAL_NAV_URL: '//uni-nav.topcoder-dev.com/v1/tc-universal-nav.js', MEMBER_PROFILE_REDIRECT_URL: 'https://profiles.topcoder-dev.com', + MEMBER_SEARCH_REDIRECT_URL: 'https://talent-search.topcoder-dev.com', ACCOUNT_SETTINGS_REDIRECT_URL: 'https://account-settings.topcoder-dev.com', SPRIG_ENVIRONMENT_ID: 'bUcousVQ0-yF', }; diff --git a/config/production.js b/config/production.js index 2d3a108894..5448b5208c 100644 --- a/config/production.js +++ b/config/production.js @@ -237,6 +237,7 @@ module.exports = { /* development id - makes surveys have warning about environment */ UNIVERSAL_NAV_URL: '//uni-nav.topcoder.com/v1/tc-universal-nav.js', MEMBER_PROFILE_REDIRECT_URL: 'https://profiles.topcoder.com', + MEMBER_SEARCH_REDIRECT_URL: 'https://talent-search.topcoder.com', SPRIG_ENVIRONMENT_ID: 'a-IZBZ6-r7bU', ACCOUNT_SETTINGS_REDIRECT_URL: 'https://account-settings.topcoder.com', }; diff --git a/src/shared/actions/challenge-listing/index.js b/src/shared/actions/challenge-listing/index.js index e7a3a775a7..15e5cba2e7 100644 --- a/src/shared/actions/challenge-listing/index.js +++ b/src/shared/actions/challenge-listing/index.js @@ -57,17 +57,6 @@ function getChallengeTypesDone() { .then(res => res.sort((a, b) => a.name.localeCompare(b.name))); } -/** - * Gets possible challenge tags (technologies). - * @return {Promise} - */ -function getChallengeTagsDone() { - return getService() - .getChallengeTags() - .then(res => res.map(item => item.name) - .sort((a, b) => a.localeCompare(b))); -} - /** * Notifies about reloading of all active challenges. The UUID is stored in the * state, and only challenges fetched by getAllActiveChallengesDone action with @@ -587,9 +576,6 @@ export default createActions({ GET_TOTAL_CHALLENGES_COUNT_INIT: getTotalChallengesCountInit, GET_TOTAL_CHALLENGES_COUNT_DONE: getTotalChallengesCountDone, - GET_CHALLENGE_TAGS_INIT: _.noop, - GET_CHALLENGE_TAGS_DONE: getChallengeTagsDone, - GET_PAST_CHALLENGES_INIT: getPastChallengesInit, GET_PAST_CHALLENGES_DONE: getPastChallengesDone, diff --git a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx index 4cf6d9a9ac..2cf6985974 100644 --- a/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx +++ b/src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx @@ -12,7 +12,7 @@ * * Challenge keywords and tracks filters allow to choose multiple keywords from * the predefined sets, which should be passed into the component as string arrays - * via the 'validKeywords' and 'validTracks' properties. The whole filters panel + * via the 'validTracks' properties. The whole filters panel * can be hidden/displayed by setting the boolean 'hidden' property. * * Each time the user modifies any filter, this component triggers the callback @@ -64,7 +64,6 @@ export default function FiltersPanel({ // selectedCommunityId, setFilterState, setSearchText, - // validKeywords, validTypes, // isSavingFilter, expanded, @@ -343,7 +342,6 @@ export default function FiltersPanel({ const tags = value ? value.split(',') : undefined; setFilterState({ ..._.clone(filterState), tags }); }} - options={validKeywords.map(mapOps)} simpleValue value={filterState.tags ? filterState.tags.join(',') : null} /> @@ -726,7 +724,6 @@ FiltersPanel.propTypes = { // selectedCommunityId: PT.string.isRequired, setFilterState: PT.func.isRequired, setSearchText: PT.func.isRequired, - // validKeywords: PT.arrayOf(PT.string).isRequired, validTypes: PT.arrayOf(PT.shape()).isRequired, onClose: PT.func, expanded: PT.bool.isRequired, diff --git a/src/shared/containers/challenge-listing/FilterPanel.jsx b/src/shared/containers/challenge-listing/FilterPanel.jsx index 5f5f2522ac..bdbcf43812 100644 --- a/src/shared/containers/challenge-listing/FilterPanel.jsx +++ b/src/shared/containers/challenge-listing/FilterPanel.jsx @@ -29,9 +29,7 @@ export class Container extends React.Component { componentDidMount() { const { - getKeywords, getTypes, - loadingKeywords, loadingTypes, setFilterState, // filterState, @@ -46,7 +44,6 @@ export class Container extends React.Component { getCommunityList(auth); } if (!loadingTypes) getTypes(); - if (!loadingKeywords) getKeywords(); const query = qs.parse(window.location.search.slice(1)); @@ -182,9 +179,7 @@ Container.propTypes = { }).isRequired, filterState: PT.shape().isRequired, selectedCommunityId: PT.string.isRequired, - getKeywords: PT.func.isRequired, getTypes: PT.func.isRequired, - loadingKeywords: PT.bool.isRequired, loadingTypes: PT.bool.isRequired, setFilterState: PT.func.isRequired, auth: PT.shape().isRequired, @@ -214,10 +209,6 @@ function mapDispatchToProps(dispatch) { dispatch(communityActions.tcCommunity.getListInit(uuid)); dispatch(communityActions.tcCommunity.getListDone(uuid, auth)); }, - getKeywords: () => { - dispatch(cla.getChallengeTagsInit()); - dispatch(cla.getChallengeTagsDone()); - }, selectCommunity: id => dispatch(cla.selectCommunity(id)), setFilterState: s => dispatch(cla.setFilter(s)), onClose: () => dispatch(a.setExpanded(false)), @@ -237,9 +228,7 @@ function mapStateToProps(state, ownProps) { communityList: tc.list, defaultCommunityId: ownProps.defaultCommunityId, filterState: cl.filter, - loadingKeywords: cl.loadingChallengeTags, loadingTypes: cl.loadingChallengeTypes, - validKeywords: cl.challengeTags, validTypes: cl.challengeTypes, selectedCommunityId: cl.selectedCommunityId, auth: state.auth, diff --git a/src/shared/containers/challenge-listing/Listing/index.jsx b/src/shared/containers/challenge-listing/Listing/index.jsx index c89dc1eaff..25ade36d46 100644 --- a/src/shared/containers/challenge-listing/Listing/index.jsx +++ b/src/shared/containers/challenge-listing/Listing/index.jsx @@ -466,7 +466,6 @@ export class ListingContainer extends React.Component { pastChallenges, challengeTypes, challengesUrl, - challengeTags, communityFilters, communityName, defaultCommunityId, @@ -646,7 +645,6 @@ export class ListingContainer extends React.Component { allChallenges={allChallenges} pastChallenges={pastChallenges} challengeTypes={challengeTypes} - challengeTags={challengeTags} challengesUrl={challengesUrl} communityFilter={communityFilter} communityName={communityName} @@ -765,7 +763,6 @@ ListingContainer.propTypes = { pastChallenges: PT.arrayOf(PT.shape({})), challengeTypes: PT.arrayOf(PT.shape()), challengesUrl: PT.string, - challengeTags: PT.arrayOf(PT.string).isRequired, communitiesList: PT.shape({ data: PT.arrayOf(PT.shape({ challengeFilter: PT.shape(), @@ -864,7 +861,6 @@ const mapStateToProps = (state, ownProps) => { allChallenges: cl.allChallenges, pastChallenges: cl.pastChallenges, challengeTypes: cl.challengeTypes, - challengeTags: cl.challengeTags, communitiesList: tc.list, communityFilters: tc.list.data, domain: state.domain, @@ -888,7 +884,6 @@ const mapStateToProps = (state, ownProps) => { loadingPastChallengesUUID: cl.loadingPastChallengesUUID, loadingReviewOpportunitiesUUID: cl.loadingReviewOpportunitiesUUID, loadingChallengeTypes: cl.loadingChallengeTypes, - loadingChallengeTags: cl.loadingChallengeTags, newChallengeDetails: ownProps.newChallengeDetails, openChallengesInNewTabs: ownProps.openChallengesInNewTabs, preListingMsg: ownProps.preListingMsg, diff --git a/src/shared/reducers/challenge-listing/index.js b/src/shared/reducers/challenge-listing/index.js index 319c245e0b..98c3d390e8 100644 --- a/src/shared/reducers/challenge-listing/index.js +++ b/src/shared/reducers/challenge-listing/index.js @@ -305,21 +305,6 @@ function onGetChallengeTypesDone(state, action) { }; } -/** - * Handles CHALLENGE_LISTING/GET_CHALLENGE_TAGS_DONE action. - * @param {Object} state - * @param {Object} action - * @return {Object} - */ -function onGetChallengeTagsDone(state, action) { - if (action.error) logger.error(action.payload); - return { - ...state, - challengeTags: action.error ? [] : action.payload, - loadingChallengeTags: false, - }; -} - function onGetPastChallengesInit(state, action) { const { frontFilter, page, uuid } = action.payload; const tracks = frontFilter && frontFilter.tracks; @@ -830,12 +815,6 @@ function create(initialState) { }), [a.getChallengeTypesDone]: onGetChallengeTypesDone, - [a.getChallengeTagsInit]: state => ({ - ...state, - loadingChallengeTags: true, - }), - [a.getChallengeTagsDone]: onGetChallengeTagsDone, - [a.getPastChallengesInit]: onGetPastChallengesInit, [a.getPastChallengesDone]: onGetPastChallengesDone, @@ -906,7 +885,6 @@ function create(initialState) { loadingReviewOpportunitiesUUID: '', loadingChallengeTypes: false, - loadingChallengeTags: false, reviewOpportunities: [], filter: { diff --git a/src/shared/routes/Communities/Blockchain/Routes.jsx b/src/shared/routes/Communities/Blockchain/Routes.jsx index e25565ef27..4daed8bf8c 100644 --- a/src/shared/routes/Communities/Blockchain/Routes.jsx +++ b/src/shared/routes/Communities/Blockchain/Routes.jsx @@ -21,9 +21,7 @@ import PT from 'prop-types'; import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; import TermsDetail from 'routes/TermsDetail'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; @@ -123,20 +121,11 @@ export default function Blockchain({ base, member, meta }) { exact path={`${base}/leaderboard`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> } exact diff --git a/src/shared/routes/Communities/CS/Routes.jsx b/src/shared/routes/Communities/CS/Routes.jsx index 4a439b6d7d..a6b9bbefc4 100644 --- a/src/shared/routes/Communities/CS/Routes.jsx +++ b/src/shared/routes/Communities/CS/Routes.jsx @@ -17,9 +17,7 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; import theme from 'components/tc-communities/communities/cs/theme'; import { ThemeProvider } from 'react-css-super-themr'; import { Route, Switch } from 'react-router-dom'; @@ -85,20 +83,11 @@ export default function CS({ base, meta }) { exact path={`${base}/challenges/terms/detail/:termId`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> } diff --git a/src/shared/routes/Communities/Community2/Routes.jsx b/src/shared/routes/Communities/Community2/Routes.jsx index b4ecc87615..f7999f09ec 100644 --- a/src/shared/routes/Communities/Community2/Routes.jsx +++ b/src/shared/routes/Communities/Community2/Routes.jsx @@ -13,7 +13,6 @@ import PT from 'prop-types'; import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import TermsDetail from 'routes/TermsDetail'; import { Route, Switch } from 'react-router-dom'; @@ -77,21 +76,6 @@ export default function Community2({ base, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/DemoExpert/Routes.jsx b/src/shared/routes/Communities/DemoExpert/Routes.jsx index e843938075..0a61cda1f6 100644 --- a/src/shared/routes/Communities/DemoExpert/Routes.jsx +++ b/src/shared/routes/Communities/DemoExpert/Routes.jsx @@ -14,7 +14,6 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; @@ -77,21 +76,6 @@ export default function DemoExpert({ base, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/Mobile/Routes.jsx b/src/shared/routes/Communities/Mobile/Routes.jsx index 8a5697d40a..9960afaf6f 100644 --- a/src/shared/routes/Communities/Mobile/Routes.jsx +++ b/src/shared/routes/Communities/Mobile/Routes.jsx @@ -12,7 +12,6 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -91,11 +90,6 @@ export default function Mobile({ base, meta }) { exact path={`${base}/challenges/terms/detail/:termId`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/QA/Routes.jsx b/src/shared/routes/Communities/QA/Routes.jsx index d46d97893b..2020f95ad4 100644 --- a/src/shared/routes/Communities/QA/Routes.jsx +++ b/src/shared/routes/Communities/QA/Routes.jsx @@ -14,7 +14,6 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; @@ -77,21 +76,6 @@ export default function QA({ base, member, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/SRMx/Routes.jsx b/src/shared/routes/Communities/SRMx/Routes.jsx index cc658a9606..b50f0a4e0a 100644 --- a/src/shared/routes/Communities/SRMx/Routes.jsx +++ b/src/shared/routes/Communities/SRMx/Routes.jsx @@ -14,7 +14,6 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; @@ -77,21 +76,6 @@ export default function SRMx({ base, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO01/Routes.jsx b/src/shared/routes/Communities/TCO01/Routes.jsx index d5fa2ba848..7cc32cc7bc 100644 --- a/src/shared/routes/Communities/TCO01/Routes.jsx +++ b/src/shared/routes/Communities/TCO01/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO01({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO02/Routes.jsx b/src/shared/routes/Communities/TCO02/Routes.jsx index 5107d7f8eb..6aa1064388 100644 --- a/src/shared/routes/Communities/TCO02/Routes.jsx +++ b/src/shared/routes/Communities/TCO02/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO02({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO03/Routes.jsx b/src/shared/routes/Communities/TCO03/Routes.jsx index d8863c4813..9606e2c82c 100644 --- a/src/shared/routes/Communities/TCO03/Routes.jsx +++ b/src/shared/routes/Communities/TCO03/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO03({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO04/Routes.jsx b/src/shared/routes/Communities/TCO04/Routes.jsx index b37d306b6f..be8c97781f 100644 --- a/src/shared/routes/Communities/TCO04/Routes.jsx +++ b/src/shared/routes/Communities/TCO04/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO04({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO05/Routes.jsx b/src/shared/routes/Communities/TCO05/Routes.jsx index c202645b94..b661d87b30 100644 --- a/src/shared/routes/Communities/TCO05/Routes.jsx +++ b/src/shared/routes/Communities/TCO05/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO05({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO06/Routes.jsx b/src/shared/routes/Communities/TCO06/Routes.jsx index f3434ad565..fce1606514 100644 --- a/src/shared/routes/Communities/TCO06/Routes.jsx +++ b/src/shared/routes/Communities/TCO06/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO06({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO07/Routes.jsx b/src/shared/routes/Communities/TCO07/Routes.jsx index d6c3ee7d0f..b51f922d15 100644 --- a/src/shared/routes/Communities/TCO07/Routes.jsx +++ b/src/shared/routes/Communities/TCO07/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO07({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO08/Routes.jsx b/src/shared/routes/Communities/TCO08/Routes.jsx index dcfa50e2f1..6504c1a60a 100644 --- a/src/shared/routes/Communities/TCO08/Routes.jsx +++ b/src/shared/routes/Communities/TCO08/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO08({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO09/Routes.jsx b/src/shared/routes/Communities/TCO09/Routes.jsx index d886fb0470..36857cf331 100644 --- a/src/shared/routes/Communities/TCO09/Routes.jsx +++ b/src/shared/routes/Communities/TCO09/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO09({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO10/Routes.jsx b/src/shared/routes/Communities/TCO10/Routes.jsx index 3f650fcaa6..273594892f 100644 --- a/src/shared/routes/Communities/TCO10/Routes.jsx +++ b/src/shared/routes/Communities/TCO10/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO10({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO11/Routes.jsx b/src/shared/routes/Communities/TCO11/Routes.jsx index 53046b3ce3..08e6815d19 100644 --- a/src/shared/routes/Communities/TCO11/Routes.jsx +++ b/src/shared/routes/Communities/TCO11/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO11({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO12/Routes.jsx b/src/shared/routes/Communities/TCO12/Routes.jsx index 553f7479fd..f8003f0d53 100644 --- a/src/shared/routes/Communities/TCO12/Routes.jsx +++ b/src/shared/routes/Communities/TCO12/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO12({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO13/Routes.jsx b/src/shared/routes/Communities/TCO13/Routes.jsx index 8d63302d76..c81ef4aff1 100644 --- a/src/shared/routes/Communities/TCO13/Routes.jsx +++ b/src/shared/routes/Communities/TCO13/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO13({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO14/Routes.jsx b/src/shared/routes/Communities/TCO14/Routes.jsx index 6130a6072b..7538b9f8c8 100644 --- a/src/shared/routes/Communities/TCO14/Routes.jsx +++ b/src/shared/routes/Communities/TCO14/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO14({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO15/Routes.jsx b/src/shared/routes/Communities/TCO15/Routes.jsx index 300182524c..61036e771a 100644 --- a/src/shared/routes/Communities/TCO15/Routes.jsx +++ b/src/shared/routes/Communities/TCO15/Routes.jsx @@ -7,7 +7,6 @@ import Error404 from 'components/Error404'; import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -24,11 +23,6 @@ export default function TCO15({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO16/Routes.jsx b/src/shared/routes/Communities/TCO16/Routes.jsx index a29acb4046..ea7f93c057 100644 --- a/src/shared/routes/Communities/TCO16/Routes.jsx +++ b/src/shared/routes/Communities/TCO16/Routes.jsx @@ -8,7 +8,6 @@ import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; import { Route, Switch } from 'react-router-dom'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import headerTheme from 'components/tc-communities/communities/tco/themes/header.scss'; @@ -24,11 +23,6 @@ export default function TCO16({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO17/Routes.jsx b/src/shared/routes/Communities/TCO17/Routes.jsx index 81d625aec1..c153e98f4e 100644 --- a/src/shared/routes/Communities/TCO17/Routes.jsx +++ b/src/shared/routes/Communities/TCO17/Routes.jsx @@ -8,7 +8,6 @@ import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; import { Route, Switch } from 'react-router-dom'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import headerTheme from 'components/tc-communities/communities/tco/themes/header.scss'; @@ -24,11 +23,6 @@ export default function TCO17({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO18/Routes.jsx b/src/shared/routes/Communities/TCO18/Routes.jsx index 4e4aca25d4..625b0f56a7 100644 --- a/src/shared/routes/Communities/TCO18/Routes.jsx +++ b/src/shared/routes/Communities/TCO18/Routes.jsx @@ -8,7 +8,6 @@ import Header from 'containers/tc-communities/Header'; import PT from 'prop-types'; import React from 'react'; import { Route, Switch } from 'react-router-dom'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import headerTheme from 'components/tc-communities/communities/tco/themes/header.scss'; @@ -24,11 +23,6 @@ export default function TCO18({ base, meta }) { theme={headerTheme} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO19/Routes.jsx b/src/shared/routes/Communities/TCO19/Routes.jsx index cff52d9c4b..18f48053dd 100644 --- a/src/shared/routes/Communities/TCO19/Routes.jsx +++ b/src/shared/routes/Communities/TCO19/Routes.jsx @@ -13,7 +13,6 @@ import ContentfulLoader from 'containers/ContentfulLoader'; import Blog from 'components/Contentful/Blog'; import { HeroImageLoader } from 'components/Contentful/BlogPost'; import ContentfulRoute from 'components/Contentful/Route'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { config } from 'topcoder-react-utils'; @@ -32,11 +31,6 @@ export default function TCO19({ base, meta }) { logoutRedirect={config.URL.TCO19} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO20/Routes.jsx b/src/shared/routes/Communities/TCO20/Routes.jsx index bfb0a513bb..11a35c3ca3 100644 --- a/src/shared/routes/Communities/TCO20/Routes.jsx +++ b/src/shared/routes/Communities/TCO20/Routes.jsx @@ -8,7 +8,6 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; import ContentfulRoute from 'components/Contentful/Route'; import Viewport from 'components/Contentful/Viewport'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import TCO20Header from 'containers/tc-communities/tco20/Header'; @@ -17,11 +16,6 @@ export default function TCO20({ base, meta }) {
- } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TCO21/Routes.jsx b/src/shared/routes/Communities/TCO21/Routes.jsx index ea68191323..7489670379 100644 --- a/src/shared/routes/Communities/TCO21/Routes.jsx +++ b/src/shared/routes/Communities/TCO21/Routes.jsx @@ -8,9 +8,7 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; import ContentfulRoute from 'components/Contentful/Route'; import ContentfulMenu from 'components/Contentful/Menu'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; export default function TCO21({ base, meta }) { return ( @@ -26,20 +24,11 @@ export default function TCO21({ base, meta }) { ) : null } - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> } diff --git a/src/shared/routes/Communities/TCO22/Routes.jsx b/src/shared/routes/Communities/TCO22/Routes.jsx index 7bbb11754e..4fe0989960 100644 --- a/src/shared/routes/Communities/TCO22/Routes.jsx +++ b/src/shared/routes/Communities/TCO22/Routes.jsx @@ -8,9 +8,7 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; import ContentfulRoute from 'components/Contentful/Route'; import ContentfulMenu from 'components/Contentful/Menu'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; export default function TCO22({ base, meta }) { return ( @@ -26,20 +24,11 @@ export default function TCO22({ base, meta }) { ) : null } - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> } diff --git a/src/shared/routes/Communities/TCO23/Routes.jsx b/src/shared/routes/Communities/TCO23/Routes.jsx index 126febfe6a..8b6b031818 100644 --- a/src/shared/routes/Communities/TCO23/Routes.jsx +++ b/src/shared/routes/Communities/TCO23/Routes.jsx @@ -8,9 +8,7 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; import ContentfulRoute from 'components/Contentful/Route'; import ContentfulMenu from 'components/Contentful/Menu'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; export default function TCO23({ base, meta }) { return ( @@ -26,20 +24,11 @@ export default function TCO23({ base, meta }) { ) : null } - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> } diff --git a/src/shared/routes/Communities/TaskForce/Routes.jsx b/src/shared/routes/Communities/TaskForce/Routes.jsx index 28a718e003..237c950f05 100644 --- a/src/shared/routes/Communities/TaskForce/Routes.jsx +++ b/src/shared/routes/Communities/TaskForce/Routes.jsx @@ -13,7 +13,6 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; @@ -76,11 +75,6 @@ export default function TaskForce({ base, meta }) { exact path={`${base}/challenges/terms/detail/:termId`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/TcProdDev/Routes/index.jsx b/src/shared/routes/Communities/TcProdDev/Routes/index.jsx index 8f6027cd7e..58b411ff20 100644 --- a/src/shared/routes/Communities/TcProdDev/Routes/index.jsx +++ b/src/shared/routes/Communities/TcProdDev/Routes/index.jsx @@ -16,7 +16,6 @@ import { ThemeProvider } from 'react-css-super-themr'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; @@ -78,21 +77,6 @@ export default function TcProdDev({ base, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/Veterans/Routes.jsx b/src/shared/routes/Communities/Veterans/Routes.jsx index d3defe66c3..c15f932bc7 100644 --- a/src/shared/routes/Communities/Veterans/Routes.jsx +++ b/src/shared/routes/Communities/Veterans/Routes.jsx @@ -17,9 +17,7 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; import { ThemeProvider } from 'react-css-super-themr'; import { Route, Switch } from 'react-router-dom'; import { BUCKETS, registerBucket } from 'utils/challenge-listing/buckets'; @@ -105,20 +103,11 @@ export default function Veterans({ base, member, meta }) { exact path={`${base}/challenges/terms/detail/:termId`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> } exact diff --git a/src/shared/routes/Communities/Wipro/Routes.jsx b/src/shared/routes/Communities/Wipro/Routes.jsx index 18398703a5..ebdd6aec58 100644 --- a/src/shared/routes/Communities/Wipro/Routes.jsx +++ b/src/shared/routes/Communities/Wipro/Routes.jsx @@ -13,9 +13,7 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; -import Settings from 'routes/Settings'; import Viewport from 'components/Contentful/Viewport'; import theme from 'components/tc-communities/communities/wipro/theme'; import { ThemeProvider } from 'react-css-super-themr'; @@ -71,34 +69,11 @@ export default function Wipro({ base, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} /> - } - path={`${base}/settings`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - path={`${base}/settings`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/Communities/iot/Routes.jsx b/src/shared/routes/Communities/iot/Routes.jsx index aaf8166071..6da2ac0e14 100644 --- a/src/shared/routes/Communities/iot/Routes.jsx +++ b/src/shared/routes/Communities/iot/Routes.jsx @@ -18,7 +18,6 @@ import React from 'react'; import Submission from 'routes/Submission'; import SubmissionManagement from 'routes/SubmissionManagement'; import TermsDetail from 'routes/TermsDetail'; -import Profile from 'routes/Profile'; import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; @@ -90,21 +89,6 @@ export default function IoT({ base, meta }) { exact path={`${base}/challenges/:challengeId([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12}|\\d{5,8})/my-submissions`} /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} - /> - } - exact - path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} - /> } exact diff --git a/src/shared/routes/RedirectMemberSearch.jsx b/src/shared/routes/RedirectMemberSearch.jsx new file mode 100644 index 0000000000..9efe6fa79c --- /dev/null +++ b/src/shared/routes/RedirectMemberSearch.jsx @@ -0,0 +1,27 @@ +/** + * The loader of Profile webpack chunks. + */ +import React from 'react'; +import PT from 'prop-types'; +import { config } from 'topcoder-react-utils'; +import RedirectExternalUrlPage from '../components/RedirectExternalUrlPage'; + +export default function RedirectMemberSearch(props) { + const { + location: { + search, + }, + } = props; + + return ( + + ); +} + +RedirectMemberSearch.propTypes = { + location: PT.shape({ + search: PT.string, + }).isRequired, +}; diff --git a/src/shared/routes/Topcoder/Routes.jsx b/src/shared/routes/Topcoder/Routes.jsx index 707ca1d1d4..244f670302 100644 --- a/src/shared/routes/Topcoder/Routes.jsx +++ b/src/shared/routes/Topcoder/Routes.jsx @@ -32,7 +32,6 @@ import Settings from '../Settings'; import HallOfFame from '../HallOfFame'; import ProfileBadges from '../ProfileBadges'; import Scoreboard from '../tco/scoreboard'; -import MemberSearch from '../../containers/MemberSearch'; import './styles.scss'; @@ -186,11 +185,6 @@ export default function Topcoder() { exact path={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/:articleTitle`} /> - )} diff --git a/src/shared/routes/index.jsx b/src/shared/routes/index.jsx index d5a831c24a..86932d06c0 100644 --- a/src/shared/routes/index.jsx +++ b/src/shared/routes/index.jsx @@ -30,6 +30,7 @@ import TimelineWall from './TimelineWall'; import PolicyPages from './PolicyPages'; import GigsPages from './GigsPages'; import ProfileRedirect from './ProfileRedirect'; +import RedirectMemberSearch from './RedirectMemberSearch'; import SettingRedirect from './Settings/SettingRedirect'; import './Topcoder/styles.scss'; @@ -43,21 +44,34 @@ function Routes({ communityId }) { title="Topcoder" /> ); + if (communityId) { return ( -
- {metaTags} - ( - - )} - communityId={communityId} + + + -
+
+ {metaTags} + ( + + )} + communityId={communityId} + /> +
+
); } return ( @@ -173,6 +187,11 @@ function Routes({ communityId }) { exact path="/members/:handle([\w\-\[\].{} ]{2,15})" /> +
From 9b476b562aa6c1f670d63d8288df50e7e905c595 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Thu, 24 Aug 2023 06:42:02 +1000 Subject: [PATCH 2/6] Deploy changes to dev --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 66efbb4b3f..5b5d3d870a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -352,6 +352,7 @@ workflows: - PROD-4183 - MP-327 - fix_country_setting_in_profile + - justin_redirects # This is alternate dev env for parallel testing - "build-test": context : org-global From 0e8902ed30e3720025fcacec7e08fe5bc2b96c03 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 25 Aug 2023 09:04:35 +1000 Subject: [PATCH 3/6] Fix redirect for https://topcoder.atlassian.net/browse/MP-352 --- config/default.js | 2 +- config/production.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/default.js b/config/default.js index 3ba54a68db..b54f9ff7ee 100644 --- a/config/default.js +++ b/config/default.js @@ -427,7 +427,7 @@ module.exports = { ACCOUNT_MENU: [ { title: 'Settings', - href: '/settings/profile', + href: '/settings/account', }, { separator: true }, { diff --git a/config/production.js b/config/production.js index 5448b5208c..c372930853 100644 --- a/config/production.js +++ b/config/production.js @@ -211,7 +211,7 @@ module.exports = { ACCOUNT_MENU: [ { title: 'Settings', - href: '/settings/profile?ref=nav', + href: '/settings/account', }, { separator: true }, { From 282fbe5f2bfa7e4c7a7f74dc2aa6dd15740dc766 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 25 Aug 2023 09:16:11 +1000 Subject: [PATCH 4/6] Fix failing test --- __tests__/shared/components/Header/__snapshots__/index.jsx.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tests__/shared/components/Header/__snapshots__/index.jsx.snap b/__tests__/shared/components/Header/__snapshots__/index.jsx.snap index 4379a704c9..2b1282b6d4 100644 --- a/__tests__/shared/components/Header/__snapshots__/index.jsx.snap +++ b/__tests__/shared/components/Header/__snapshots__/index.jsx.snap @@ -154,7 +154,7 @@ exports[`Default render 1`] = ` accountMenu={ Array [ Object { - "href": "/settings/profile", + "href": "/settings/account", "title": "Settings", }, Object { From 53b1eab1cf80b7f784b1775d81d4641b174fb737 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 25 Aug 2023 19:30:57 +1000 Subject: [PATCH 5/6] Fix profile / settings redirection from older headers --- src/shared/components/TopcoderHeader/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/TopcoderHeader/index.jsx b/src/shared/components/TopcoderHeader/index.jsx index dd8e688283..5e8f5d73f4 100644 --- a/src/shared/components/TopcoderHeader/index.jsx +++ b/src/shared/components/TopcoderHeader/index.jsx @@ -288,7 +288,7 @@ export default class TopcoderHeader extends React.Component { }, { enforceA: true, icon: , - link: '/settings/profile', + link: '/settings/account', title: 'Settings', }, { enforceA: true, From cb9cd5a431ada304d546dcaa31a1e77ec6c7a965 Mon Sep 17 00:00:00 2001 From: Justin Gasper Date: Fri, 25 Aug 2023 20:06:05 +1000 Subject: [PATCH 6/6] =?UTF-8?q?One=20more=20area=20where=20it=E2=80=99s=20?= =?UTF-8?q?settings/profile=20incorrectly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/shared/components/tc-communities/Header/index.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/tc-communities/Header/index.jsx b/src/shared/components/tc-communities/Header/index.jsx index 17ce212234..ff60ef6167 100644 --- a/src/shared/components/tc-communities/Header/index.jsx +++ b/src/shared/components/tc-communities/Header/index.jsx @@ -87,7 +87,7 @@ function Header(props) { title: 'Payments', }, { icon: , - link: `${meta ? _.replace(BASE_URL, 'www', meta.subdomains[0]) : BASE_URL}/settings/profile`, + link: `${meta ? _.replace(BASE_URL, 'www', meta.subdomains[0]) : BASE_URL}/settings/account`, title: 'Settings', }, { icon: ,