From 173c555c02dcb9570bd7be3df9c75b6bedc8e409 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 10 Jun 2021 14:17:51 +0300 Subject: [PATCH 1/2] Implement #5564 --- src/server/tc-communities/tco22/metadata.json | 20 +++++++ src/shared/routes/Communities/Routes.jsx | 2 + .../routes/Communities/TCO22/Routes.jsx | 60 +++++++++++++++++++ src/shared/routes/Communities/TCO22/index.jsx | 32 ++++++++++ 4 files changed, 114 insertions(+) create mode 100644 src/server/tc-communities/tco22/metadata.json create mode 100644 src/shared/routes/Communities/TCO22/Routes.jsx create mode 100644 src/shared/routes/Communities/TCO22/index.jsx diff --git a/src/server/tc-communities/tco22/metadata.json b/src/server/tc-communities/tco22/metadata.json new file mode 100644 index 0000000000..8fb39face2 --- /dev/null +++ b/src/server/tc-communities/tco22/metadata.json @@ -0,0 +1,20 @@ +{ + "challengeFilter": { + "events": ["tco22"] + }, + "communityId": "tco22", + "communityName": "TCO22", + "groupIds": [], + "hideSearch": true, + "logos": [{ + "img": "/community-app-assets/themes/tco/TCO22.svg", + "url": "https://tco22.topcoder.com" + }], + "menuItems": [{ + "navigationMenu": "5zZw57ZcKXWfOwwWbk5VnL" + }], + "newsFeed": "http://www.topcoder.com/feed", + "subdomains": ["tco22"], + "description": "2022 Topcoder Open. The Ultimate Programming & Design Tournament", + "image": "tco22.jpg" +} diff --git a/src/shared/routes/Communities/Routes.jsx b/src/shared/routes/Communities/Routes.jsx index 5f3d42ce6f..920791339e 100644 --- a/src/shared/routes/Communities/Routes.jsx +++ b/src/shared/routes/Communities/Routes.jsx @@ -38,6 +38,7 @@ import tco18 from './TCO18'; import tco19 from './TCO19'; import tco20 from './TCO20'; import tco21 from './TCO21'; +import tco22 from './TCO22'; import Mobile from './Mobile'; import Zurich from './Zurich'; import Comcast from './Comcast'; @@ -64,6 +65,7 @@ const TCOs = { tco19, tco20, tco21, + tco22, }; export default function Communities({ diff --git a/src/shared/routes/Communities/TCO22/Routes.jsx b/src/shared/routes/Communities/TCO22/Routes.jsx new file mode 100644 index 0000000000..7bbb11754e --- /dev/null +++ b/src/shared/routes/Communities/TCO22/Routes.jsx @@ -0,0 +1,60 @@ +/** + * Routing of TCO22 Community. + */ + +import Error404 from 'components/Error404'; +import PT from 'prop-types'; +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 ( +
+ { + meta.menuItems ? ( + + ) : null + } + + } + exact + path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})`} + /> + } + exact + path={`${base}/members/:handle([\\w\\-\\[\\].{}]{2,15})/details`} + /> + } + path={`${base}/settings`} + /> + } + id="6Ewcb5fkc67JOMhud6RoBs" + /> + +
+ ); +} + +TCO22.defaultProps = { + base: '', +}; + +TCO22.propTypes = { + base: PT.string, + meta: PT.shape().isRequired, +}; diff --git a/src/shared/routes/Communities/TCO22/index.jsx b/src/shared/routes/Communities/TCO22/index.jsx new file mode 100644 index 0000000000..661df77231 --- /dev/null +++ b/src/shared/routes/Communities/TCO22/index.jsx @@ -0,0 +1,32 @@ +/** + * Loader for the community's code chunks. + */ + +import LoadingIndicator from 'components/LoadingIndicator'; +import path from 'path'; +import PT from 'prop-types'; +import React from 'react'; +import { AppChunk, webpack } from 'topcoder-react-utils'; + +export default function ChunkLoader({ base, meta }) { + return ( + import(/* webpackChunkName: "tco22-community/chunk" */ './Routes') + .then(({ default: Routes }) => ( + + )) + } + renderPlaceholder={() => } + renderServer={() => { + const Routes = webpack.requireWeak(path.resolve(__dirname, './Routes')); + return ; + }} + /> + ); +} + +ChunkLoader.propTypes = { + base: PT.string.isRequired, + meta: PT.shape().isRequired, +}; From 42215729f65001be0a95f03aa24295460de18e48 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 10 Jun 2021 14:25:26 +0300 Subject: [PATCH 2/2] ci: on beta --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 968598bb1c..1a653b8721 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -361,7 +361,7 @@ workflows: filters: branches: only: - - thrive-bug-fixes2 + - tco22 # This is stage env for production QA releases - "build-prod-staging": context : org-global