File tree Expand file tree Collapse file tree 4 files changed +114
-0
lines changed
server/tc-communities/tco22
shared/routes/Communities Expand file tree Collapse file tree 4 files changed +114
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "challengeFilter" : {
3+ "events" : [" tco22" ]
4+ },
5+ "communityId" : " tco22" ,
6+ "communityName" : " TCO22" ,
7+ "groupIds" : [],
8+ "hideSearch" : true ,
9+ "logos" : [{
10+ "img" : " /community-app-assets/themes/tco/TCO22.svg" ,
11+ "url" : " https://tco22.topcoder.com"
12+ }],
13+ "menuItems" : [{
14+ "navigationMenu" : " 5zZw57ZcKXWfOwwWbk5VnL"
15+ }],
16+ "newsFeed" : " http://www.topcoder.com/feed" ,
17+ "subdomains" : [" tco22" ],
18+ "description" : " 2022 Topcoder Open. The Ultimate Programming & Design Tournament" ,
19+ "image" : " tco22.jpg"
20+ }
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import tco18 from './TCO18';
3838import tco19 from './TCO19' ;
3939import tco20 from './TCO20' ;
4040import tco21 from './TCO21' ;
41+ import tco22 from './TCO22' ;
4142import Mobile from './Mobile' ;
4243import Zurich from './Zurich' ;
4344import Comcast from './Comcast' ;
@@ -64,6 +65,7 @@ const TCOs = {
6465 tco19,
6566 tco20,
6667 tco21,
68+ tco22,
6769} ;
6870
6971export default function Communities ( {
Original file line number Diff line number Diff line change 1+ /**
2+ * Routing of TCO22 Community.
3+ */
4+
5+ import Error404 from 'components/Error404' ;
6+ import PT from 'prop-types' ;
7+ import React from 'react' ;
8+ import { Route , Switch } from 'react-router-dom' ;
9+ import ContentfulRoute from 'components/Contentful/Route' ;
10+ import ContentfulMenu from 'components/Contentful/Menu' ;
11+ import Profile from 'routes/Profile' ;
12+ import ProfileStats from 'routes/ProfileStats' ;
13+ import Settings from 'routes/Settings' ;
14+
15+ export default function TCO22 ( { base, meta } ) {
16+ return (
17+ < div >
18+ {
19+ meta . menuItems ? (
20+ < ContentfulMenu
21+ id = { meta . menuItems [ 0 ] . navigationMenu }
22+ spaceName = { meta . menuItems [ 0 ] . spaceName }
23+ environment = { meta . menuItems [ 0 ] . environment }
24+ baseUrl = { base }
25+ />
26+ ) : null
27+ }
28+ < Switch >
29+ < Route
30+ render = { props => < Profile { ...props } meta = { meta } /> }
31+ exact
32+ path = { `${ base } /members/:handle([\\w\\-\\[\\].{}]{2,15})` }
33+ />
34+ < Route
35+ render = { props => < ProfileStats { ...props } meta = { meta } /> }
36+ exact
37+ path = { `${ base } /members/:handle([\\w\\-\\[\\].{}]{2,15})/details` }
38+ />
39+ < Route
40+ component = { ( ) => < Settings base = { `${ base } /settings` } /> }
41+ path = { `${ base } /settings` }
42+ />
43+ < ContentfulRoute
44+ baseUrl = { base }
45+ error404 = { < Error404 /> }
46+ id = "6Ewcb5fkc67JOMhud6RoBs"
47+ />
48+ </ Switch >
49+ </ div >
50+ ) ;
51+ }
52+
53+ TCO22 . defaultProps = {
54+ base : '' ,
55+ } ;
56+
57+ TCO22 . propTypes = {
58+ base : PT . string ,
59+ meta : PT . shape ( ) . isRequired ,
60+ } ;
Original file line number Diff line number Diff line change 1+ /**
2+ * Loader for the community's code chunks.
3+ */
4+
5+ import LoadingIndicator from 'components/LoadingIndicator' ;
6+ import path from 'path' ;
7+ import PT from 'prop-types' ;
8+ import React from 'react' ;
9+ import { AppChunk , webpack } from 'topcoder-react-utils' ;
10+
11+ export default function ChunkLoader ( { base, meta } ) {
12+ return (
13+ < AppChunk
14+ chunkName = "tco22-community/chunk"
15+ renderClientAsync = { ( ) => import ( /* webpackChunkName: "tco22-community/chunk" */ './Routes' )
16+ . then ( ( { default : Routes } ) => (
17+ < Routes base = { base } meta = { meta } />
18+ ) )
19+ }
20+ renderPlaceholder = { ( ) => < LoadingIndicator /> }
21+ renderServer = { ( ) => {
22+ const Routes = webpack . requireWeak ( path . resolve ( __dirname , './Routes' ) ) ;
23+ return < Routes base = { base } meta = { meta } /> ;
24+ } }
25+ />
26+ ) ;
27+ }
28+
29+ ChunkLoader . propTypes = {
30+ base : PT . string . isRequired ,
31+ meta : PT . shape ( ) . isRequired ,
32+ } ;
You can’t perform that action at this time.
0 commit comments