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, +};