diff --git a/src/shared/containers/challenge-listing/Listing/index.jsx b/src/shared/containers/challenge-listing/Listing/index.jsx index ab8c52a856..77104cb8e6 100644 --- a/src/shared/containers/challenge-listing/Listing/index.jsx +++ b/src/shared/containers/challenge-listing/Listing/index.jsx @@ -25,7 +25,7 @@ import sidebarActions from 'actions/challenge-listing/sidebar'; import communityActions from 'actions/tc-communities'; // import SORT from 'utils/challenge-listing/sort'; import { BUCKETS, filterChanged, sortChangedBucket } from 'utils/challenge-listing/buckets'; -import { MetaTags } from 'topcoder-react-utils'; +import MetaTags from 'components/MetaTags'; import { USER_GROUP_MAXAGE } from 'config'; import { updateChallengeType } from 'utils/challenge'; diff --git a/src/shared/containers/terms-detail/index.jsx b/src/shared/containers/terms-detail/index.jsx index af5efa5ab0..66755806ec 100644 --- a/src/shared/containers/terms-detail/index.jsx +++ b/src/shared/containers/terms-detail/index.jsx @@ -11,7 +11,7 @@ import _ from 'lodash'; import LoadingIndicator from 'components/LoadingIndicator'; import TermDetails from 'components/Terms/TermDetails'; import { actions } from 'topcoder-react-lib'; -import { MetaTags } from 'topcoder-react-utils'; +import MetaTags from 'components/MetaTags'; import { Modal, PrimaryButton } from 'topcoder-react-ui-kit'; import SwitchWithLabel from 'components/SwitchWithLabel'; import { themr } from 'react-css-super-themr'; diff --git a/src/shared/routes/Communities/Blockchain/Routes.jsx b/src/shared/routes/Communities/Blockchain/Routes.jsx index 6ede568403..e25565ef27 100644 --- a/src/shared/routes/Communities/Blockchain/Routes.jsx +++ b/src/shared/routes/Communities/Blockchain/Routes.jsx @@ -27,7 +27,8 @@ import Settings from 'routes/Settings'; import TermsDetail from 'routes/TermsDetail'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; -import { config, MetaTags } from 'topcoder-react-utils'; +import { config } from 'topcoder-react-utils'; +import MetaTags from 'components/MetaTags'; import primaryButtonStyle from 'components/buttons/outline/round/open-sans/green-uppercase.scss'; import secondaryButtonStyle from 'components/buttons/outline/round/open-sans/blue-uppercase.scss'; diff --git a/src/shared/routes/Communities/Cognitive/Routes.jsx b/src/shared/routes/Communities/Cognitive/Routes.jsx index 1e82a637f8..df8e3f2854 100644 --- a/src/shared/routes/Communities/Cognitive/Routes.jsx +++ b/src/shared/routes/Communities/Cognitive/Routes.jsx @@ -23,7 +23,8 @@ import socialImage from 'assets/images/communities/cognitive/social.jpg'; import TermsDetail from 'routes/TermsDetail'; import { Route, Switch } from 'react-router-dom'; -import { config, MetaTags } from 'topcoder-react-utils'; +import { config } from 'topcoder-react-utils'; +import MetaTags from 'components/MetaTags'; export default function Cognitive({ base, member, meta }) { return ( diff --git a/src/shared/routes/Communities/Mobile/Routes.jsx b/src/shared/routes/Communities/Mobile/Routes.jsx index 92a94cb724..8a5697d40a 100644 --- a/src/shared/routes/Communities/Mobile/Routes.jsx +++ b/src/shared/routes/Communities/Mobile/Routes.jsx @@ -17,7 +17,8 @@ import ProfileStats from 'routes/ProfileStats'; import { Route, Switch } from 'react-router-dom'; import { ThemeProvider } from 'react-css-super-themr'; -import { config, MetaTags } from 'topcoder-react-utils'; +import { config } from 'topcoder-react-utils'; +import MetaTags from 'components/MetaTags'; import primaryButtonStyle from 'components/buttons/outline/round/open-sans/green-uppercase.scss'; import secondaryButtonStyle from 'components/buttons/outline/round/open-sans/blue-uppercase.scss'; diff --git a/src/shared/routes/EDUHome.jsx b/src/shared/routes/EDUHome.jsx new file mode 100644 index 0000000000..ef5db510aa --- /dev/null +++ b/src/shared/routes/EDUHome.jsx @@ -0,0 +1,26 @@ +/** + * The loader of EDUHome page webpack chunks. + */ +import path from 'path'; +import React from 'react'; +import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder'; +import { AppChunk, webpack } from 'topcoder-react-utils'; + +export default function EDUHome(props) { + return ( + import(/* webpackChunkName: "eduHome/chunk" */ 'containers/EDU/Home') + .then(({ default: Home }) => ( + + )) + } + renderPlaceholder={() => } + renderServer={() => { + const p = webpack.resolveWeak('containers/EDU/Home'); + const Home = webpack.requireWeak(path.resolve(__dirname, p)); + return ; + }} + /> + ); +} diff --git a/src/shared/routes/EDUSearch.jsx b/src/shared/routes/EDUSearch.jsx new file mode 100644 index 0000000000..be5be4dcfe --- /dev/null +++ b/src/shared/routes/EDUSearch.jsx @@ -0,0 +1,26 @@ +/** + * The loader of EDUSearch page webpack chunks. + */ +import path from 'path'; +import React from 'react'; +import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder'; +import { AppChunk, webpack } from 'topcoder-react-utils'; + +export default function EDUSearch(props) { + return ( + import(/* webpackChunkName: "eduSearch/chunk" */ 'containers/EDU/Search') + .then(({ default: Search }) => ( + + )) + } + renderPlaceholder={() => } + renderServer={() => { + const p = webpack.resolveWeak('containers/EDU/Search'); + const Search = webpack.requireWeak(path.resolve(__dirname, p)); + return ; + }} + /> + ); +} diff --git a/src/shared/routes/EDUTracks.jsx b/src/shared/routes/EDUTracks.jsx new file mode 100644 index 0000000000..2b0c3565d0 --- /dev/null +++ b/src/shared/routes/EDUTracks.jsx @@ -0,0 +1,26 @@ +/** + * The loader of EDUTracks page webpack chunks. + */ +import path from 'path'; +import React from 'react'; +import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder'; +import { AppChunk, webpack } from 'topcoder-react-utils'; + +export default function EDUTracks(props) { + return ( + import(/* webpackChunkName: "eduTracks/chunk" */ 'containers/EDU/Tracks') + .then(({ default: Tracks }) => ( + + )) + } + renderPlaceholder={() => } + renderServer={() => { + const p = webpack.resolveWeak('containers/EDU/Tracks'); + const Tracks = webpack.requireWeak(path.resolve(__dirname, p)); + return ; + }} + /> + ); +} diff --git a/src/shared/routes/GigsPages.jsx b/src/shared/routes/GigsPages.jsx index dca924c079..b822b9ab69 100644 --- a/src/shared/routes/GigsPages.jsx +++ b/src/shared/routes/GigsPages.jsx @@ -1,21 +1,26 @@ /** * The loader of Gigs page webpack chunks. */ +import path from 'path'; import React from 'react'; - import LoadingPagePlaceholder from 'components/LoadingPagePlaceholder'; -import { AppChunk } from 'topcoder-react-utils'; +import { AppChunk, webpack } from 'topcoder-react-utils'; export default function GigsPagesRoute(props) { return ( import(/* webpackChunkName: "gigsPages/chunk" */ 'containers/GigsPages') .then(({ default: GigsPagesContainer }) => ( )) } renderPlaceholder={() => } + renderServer={() => { + const p = webpack.resolveWeak('containers/GigsPages'); + const GigsPagesContainer = webpack.requireWeak(path.resolve(__dirname, p)); + return ; + }} /> ); } diff --git a/src/shared/routes/Topcoder/Routes.jsx b/src/shared/routes/Topcoder/Routes.jsx index 91904b8d53..b230077d0d 100644 --- a/src/shared/routes/Topcoder/Routes.jsx +++ b/src/shared/routes/Topcoder/Routes.jsx @@ -22,9 +22,9 @@ import ContentfulLoader from 'containers/ContentfulLoader'; import LoadingIndicator from 'components/LoadingIndicator'; import Article from 'components/Contentful/Article'; -import EDUHome from 'containers/EDU/Home'; -import EDUTracks from 'containers/EDU/Tracks'; -import EDUSearch from 'containers/EDU/Search'; +import EDUHome from '../EDUHome'; +import EDUTracks from '../EDUTracks'; +import EDUSearch from '../EDUSearch'; import ChallengeListing from './ChallengeListing'; import Dashboard from './Dashboard'; import Notifications from './Notifications'; @@ -83,7 +83,7 @@ export default function Topcoder() { } @@ -92,7 +92,7 @@ export default function Topcoder() { {/* EDU Portal */} 0 && challenge.prizeSets[0].prizes) { - const { prizes } = challenge.prizeSets[0]; + const placementPrizes = _.find(challenge.prizeSets, { type: 'placement' }); + if (placementPrizes) { + const { prizes } = placementPrizes || []; return (