diff --git a/config/default.js b/config/default.js index 011f5c5395..7f4b987e90 100644 --- a/config/default.js +++ b/config/default.js @@ -119,6 +119,8 @@ module.exports = { BLOCKCHAIN: 'https://blockchain.topcoder-dev.com', COGNITIVE: 'https://cognitive.topcoder-dev.com', ZURICH: 'https://community-app.topcoder-dev.com/__community__/zurich', + COMCAST: 'https://community-app.topcoder-dev.com/__community__/comcast', + CS: 'https://community-app.topcoder-dev.com/__community__/cs', }, /* Dedicated section to group together links to various articles in diff --git a/config/production.js b/config/production.js index bb24579130..44f89c1ef9 100644 --- a/config/production.js +++ b/config/production.js @@ -51,6 +51,8 @@ module.exports = { BLOCKCHAIN: 'https://blockchain.topcoder.com', COGNITIVE: 'https://cognitive.topcoder.com', ZURICH: 'https://zurich.topcoder.com', + COMCAST: 'https://comcast.topcoder.com', + CS: 'https://cs.topcoder.com', }, EMAIL_VERIFY_URL: 'http://www.topcoder.com/settings/account/changeEmail', }, diff --git a/src/shared/components/tc-communities/Header/index.jsx b/src/shared/components/tc-communities/Header/index.jsx index 6c8b6b9fb2..4c15cac657 100644 --- a/src/shared/components/tc-communities/Header/index.jsx +++ b/src/shared/components/tc-communities/Header/index.jsx @@ -12,7 +12,12 @@ import DesktopSubMenu from 'components/TopcoderHeader/desktop/SubMenu'; import React from 'react'; import PT from 'prop-types'; import { Avatar, PrimaryButton, Button } from 'topcoder-react-ui-kit'; -import { config, Link, NavLink } from 'topcoder-react-utils'; +import { + config, + Link, + NavLink, + isomorphy, +} from 'topcoder-react-utils'; import { getRatingColor } from 'utils/tc'; import Dropdown from 'components/tc-communities/Dropdown'; import { themr } from 'react-css-super-themr'; @@ -47,10 +52,13 @@ function Header(props) { onMobileToggleClick, profile, theme, - logoutRedirect, meta, } = props; + let { + logoutRedirect, + } = props; + const BASE_URL = config.URL.BASE; const AUTH_URL = config.URL.AUTH; const normalizedProfile = profile && _.clone(profile); @@ -59,6 +67,10 @@ function Header(props) { meta.competitorsGroupIds, ) : []; + if (_.isEmpty(logoutRedirect) && isomorphy.isClientSide()) { + logoutRedirect = window.location.href; + } + let userSubMenu; if (profile) { userSubMenu = { diff --git a/src/shared/routes/Communities/Blockchain/Routes.jsx b/src/shared/routes/Communities/Blockchain/Routes.jsx index bcf49f27bf..6ede568403 100644 --- a/src/shared/routes/Communities/Blockchain/Routes.jsx +++ b/src/shared/routes/Communities/Blockchain/Routes.jsx @@ -57,6 +57,7 @@ export default function Blockchain({ base, member, meta }) { baseUrl={base} hideJoinNow pageId={match.params.pageId || 'home'} + logoutRedirect={config.URL.COMMUNITIES.BLOCKCHAIN} />