Skip to content

Commit d58e2c0

Browse files
committed
Implement #4847 #4848
1 parent 6d446f3 commit d58e2c0

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

config/default.js

+1
Original file line numberDiff line numberDiff line change
@@ -409,4 +409,5 @@ module.exports = {
409409
TC_EDU_SEARCH_BAR_MAX_RESULTS_EACH_GROUP: 3,
410410
POLICY_PAGES_PATH: '/policy',
411411
GIGS_PAGES_PATH: '/gigs',
412+
START_PAGE_PATH: '/start',
412413
};

src/shared/routes/StartPage.jsx

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/**
2+
* The loader of Gigs page webpack chunks.
3+
*/
4+
import React from 'react';
5+
6+
import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder';
7+
import { AppChunk } from 'topcoder-react-utils';
8+
9+
export default function GigsPagesRoute(props) {
10+
return (
11+
<AppChunk
12+
chunkName="policyPages/chunk"
13+
renderClientAsync={() => import(/* webpackChunkName: "gigsPages/chunk" */ 'containers/GigsPages')
14+
.then(({ default: GigsPagesContainer }) => (
15+
<GigsPagesContainer {...props} />
16+
))
17+
}
18+
renderPlaceholder={() => <LoadingPagePlaceholder />}
19+
/>
20+
);
21+
}

src/shared/routes/index.jsx

+11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44

55
import CommunityLoader from 'containers/tc-communities/Loader';
6+
import ContentfulRoute from 'components/Contentful/Route';
67
import Content from 'components/Content';
78
import React from 'react';
89

@@ -103,6 +104,16 @@ function Routes({ communityId }) {
103104
exact
104105
path={`${config.GIGS_PAGES_PATH}/:id?`}
105106
/>
107+
<Route
108+
render={() => (
109+
<ContentfulRoute
110+
baseUrl={config.START_PAGE_PATH}
111+
id="vpcfRkUPoTtxXoEIBvCRl"
112+
/>
113+
)}
114+
exact
115+
path={config.START_PAGE_PATH}
116+
/>
106117
<Topcoder />
107118
</Switch>
108119
</div>

0 commit comments

Comments
 (0)