{
diff --git a/src/shared/containers/GigsPages/index.jsx b/src/shared/containers/GigsPages/index.jsx
index 5e5bd0431c..97ef458cf0 100644
--- a/src/shared/containers/GigsPages/index.jsx
+++ b/src/shared/containers/GigsPages/index.jsx
@@ -23,7 +23,7 @@ const optimizelyClient = createInstance({
});
const cookies = require('browser-cookies');
-const GIGS_SOCIAL_SHARE_IMAGE = 'https://images.ctfassets.net/b5f1djy59z3a/4XlYNZgq5Kfa4XdwQ6pDfV/769ea7be756a88145b88ce685f050ebc/10_Freelance_Gig.png';
+const GIGS_SOCIAL_SHARE_IMAGE = `${config.URL.CMS_ASSETS}/media/contentful/images.ctfassets.net/84/8416e431ed91f5e8234156c784e902c1723db1b4a24e3f6b62661f9b84811143/10_Freelance_Gig-8416e431ed91f5e8234156c784e902c1723db1b4a24e3f6b62661f9b84811143.png`;
function GigsPagesContainer(props) {
const {
diff --git a/src/shared/containers/TopcoderHeader/index.jsx b/src/shared/containers/TopcoderHeader/index.jsx
index ce478cb4f9..b8b859a421 100644
--- a/src/shared/containers/TopcoderHeader/index.jsx
+++ b/src/shared/containers/TopcoderHeader/index.jsx
@@ -8,7 +8,7 @@ import { MarketingNavigation, ToolNavigation } from 'uninav-react';
import { getSubPageConfiguration } from '../../utils/url';
import './styles.scss';
-const TopcoderHeader = ({ auth, location }) => {
+export const TopcoderHeader = ({ auth, location }) => {
const user = _.get(auth, 'profile') || {};
const authToken = _.get(auth, 'tokenV3');
const isAuthenticated = !!authToken;
@@ -60,6 +60,7 @@ const TopcoderHeader = ({ auth, location }) => {
return (
+
+ {/* Keep Thrive routes ahead of the generic root Contentful route. The
+ * root route otherwise loads the default CMS route before falling
+ * through to its error404 switch. */}
+
+
+
+
{
+ const { articleTitle } = p.match.params;
+ return (
+ {
+ if (_.isEmpty(data.entries.items)) {
+ // try search by title match
+ // this legacy support should be deprecated when all
+ // Thrive links switched to hypens, someday
+ return (
+ {
+ if (_.isEmpty(dataTitle.entries.items)) return ;
+ let id = dataTitle.entries.matches[0].items[0];
+ if (dataTitle.entries.matches[0].total !== 1) {
+ // more than 1 match. we need to try find best
+ const mId = _.findKey(
+ dataTitle.entries.items,
+ // eslint-disable-next-line max-len
+ o => o.fields.title.toLocaleLowerCase() === articleTitle.toLocaleLowerCase(),
+ );
+ id = mId || id;
+ }
+ const {
+ externalArticle,
+ contentUrl,
+ } = dataTitle.entries.items[id].fields;
+ if (externalArticle && contentUrl && isomorphy.isClientSide()) {
+ window.location.href = contentUrl;
+ return null;
+ }
+ return (
+
+ );
+ }}
+ renderPlaceholder={LoadingIndicator}
+ />
+ );
+ }
+ const id = data.entries.matches[0].items[0];
+ const { externalArticle, contentUrl } = data.entries.items[id].fields;
+ if (externalArticle && contentUrl && isomorphy.isClientSide()) {
+ window.location.href = contentUrl;
+ return null;
+ }
+ return (
+
+ );
+ }}
+ renderPlaceholder={LoadingIndicator}
+ />
+ );
+ }}
+ exact
+ path={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/:articleTitle`}
+ />
}
/>
- {/* EDU Portal */}
-
-
-
- {
- const { articleTitle } = p.match.params;
- return (
- {
- if (_.isEmpty(data.entries.items)) {
- // try search by title match
- // this legacy support should be deprecated when all
- // Thrive links switched to hypens, someday
- return (
- {
- if (_.isEmpty(dataTitle.entries.items)) return ;
- let id = dataTitle.entries.matches[0].items[0];
- if (dataTitle.entries.matches[0].total !== 1) {
- // more than 1 match. we need to try find best
- const mId = _.findKey(
- dataTitle.entries.items,
- // eslint-disable-next-line max-len
- o => o.fields.title.toLocaleLowerCase() === articleTitle.toLocaleLowerCase(),
- );
- id = mId || id;
- }
- const {
- externalArticle,
- contentUrl,
- } = dataTitle.entries.items[id].fields;
- if (externalArticle && contentUrl && isomorphy.isClientSide()) {
- window.location.href = contentUrl;
- return null;
- }
- return (
-
- );
- }}
- renderPlaceholder={LoadingIndicator}
- />
- );
- }
- const id = data.entries.matches[0].items[0];
- const { externalArticle, contentUrl } = data.entries.items[id].fields;
- if (externalArticle && contentUrl && isomorphy.isClientSide()) {
- window.location.href = contentUrl;
- return null;
- }
- return (
-
- );
- }}
- renderPlaceholder={LoadingIndicator}
- />
- );
- }}
- exact
- path={`${config.TC_EDU_BASE_PATH}${config.TC_EDU_ARTICLES_PATH}/:articleTitle`}
- />
)}
diff --git a/src/shared/utils/url.js b/src/shared/utils/url.js
index 117cb77947..d5c6d3e76f 100644
--- a/src/shared/utils/url.js
+++ b/src/shared/utils/url.js
@@ -185,7 +185,7 @@ export function getInitials(firstName = '', lastName = '') {
return `${firstName.slice(0, 1)}${lastName.slice(0, 1)}`;
}
-export const DEFAULT_AVATAR_URL = 'https://images.ctfassets.net/b5f1djy59z3a/4PTwZVSf3W7qgs9WssqbVa/4c51312671a4b9acbdfd7f5e22320b62/default_avatar.svg';
+export const DEFAULT_AVATAR_URL = `${config.URL.CMS_ASSETS}/media/contentful/images.ctfassets.net/56/5628bff4d68faeeebce6cfcf14c8182774fa53fc6762e5429ca42d532d9ecb0d/default_avatar-5628bff4d68faeeebce6cfcf14c8182774fa53fc6762e5429ca42d532d9ecb0d.svg`;
export const getSubPageConfiguration = (location, loginUserHandle) => {
let toolName = 'Community';