From d58e2c0aaca495ca6595266c3651e2e8597ab815 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 9 Sep 2020 12:29:44 +0300 Subject: [PATCH] Implement #4847 #4848 --- config/default.js | 1 + src/shared/routes/StartPage.jsx | 21 +++++++++++++++++++++ src/shared/routes/index.jsx | 11 +++++++++++ 3 files changed, 33 insertions(+) create mode 100644 src/shared/routes/StartPage.jsx diff --git a/config/default.js b/config/default.js index e9c1df07aa..7b9001cd62 100644 --- a/config/default.js +++ b/config/default.js @@ -409,4 +409,5 @@ module.exports = { TC_EDU_SEARCH_BAR_MAX_RESULTS_EACH_GROUP: 3, POLICY_PAGES_PATH: '/policy', GIGS_PAGES_PATH: '/gigs', + START_PAGE_PATH: '/start', }; diff --git a/src/shared/routes/StartPage.jsx b/src/shared/routes/StartPage.jsx new file mode 100644 index 0000000000..dca924c079 --- /dev/null +++ b/src/shared/routes/StartPage.jsx @@ -0,0 +1,21 @@ +/** + * The loader of Gigs page webpack chunks. + */ +import React from 'react'; + +import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder'; +import { AppChunk } from 'topcoder-react-utils'; + +export default function GigsPagesRoute(props) { + return ( + import(/* webpackChunkName: "gigsPages/chunk" */ 'containers/GigsPages') + .then(({ default: GigsPagesContainer }) => ( + + )) + } + renderPlaceholder={() => } + /> + ); +} diff --git a/src/shared/routes/index.jsx b/src/shared/routes/index.jsx index 9c8eb25569..03587a392e 100644 --- a/src/shared/routes/index.jsx +++ b/src/shared/routes/index.jsx @@ -3,6 +3,7 @@ */ import CommunityLoader from 'containers/tc-communities/Loader'; +import ContentfulRoute from 'components/Contentful/Route'; import Content from 'components/Content'; import React from 'react'; @@ -103,6 +104,16 @@ function Routes({ communityId }) { exact path={`${config.GIGS_PAGES_PATH}/:id?`} /> + ( + + )} + exact + path={config.START_PAGE_PATH} + />