diff --git a/config/default.js b/config/default.js index a0bcae4d7f..d41c64e863 100644 --- a/config/default.js +++ b/config/default.js @@ -211,27 +211,37 @@ module.exports = { GRANT_TYPE: '', }, }, - HEADER_AUTH_URLS: { - href: 'https://accounts.topcoder-dev.com/member/registration?utm_source=community-app-main', - location: 'https://accounts.topcoder-dev.com/member?retUrl=%S&utm_source=community-app-main', - }, - ACCOUNT_MENU: [ + SECONDARY_MENU_FOR_LOGGED_USER: [ + { + title: 'Dashboard', + href: '/my-dashboard', + }, + { + id: 'myprofile', + title: 'My Profile', + href: '/members/', + }, + { + title: 'Payments', + href: 'https://community.topcoder-dev.com/PactsMemberServlet?module=PaymentHistory&full_list=false', + }, + ], + SECONDARY_MENU_FOR_GUEST: [ { - title: 'Settings', - href: '/settings/profile', + title: 'Overview', + href: 'https://www.topcoder-dev.com/about', }, - { separator: true }, { - title: 'Help', - href: 'https://help.topcoder-dev.com/', + title: 'How It Works', + href: 'https://www.topcoder-dev.com/how-it-works/faqs/', }, { - title: 'About Topcoder', - href: 'https://www.topcoder.com/about/', + title: 'Tracks', + href: '/community/learn', }, { - title: 'Log Out', - href: 'https://www.topcoder-dev.com/logout', + title: 'Why Join', + href: 'https://www.topcoder-dev.com/about/why-crowdsourcing/', }, ], ACCOUNT_MENU_SWITCH_TEXT: { diff --git a/config/production.js b/config/production.js index 7a020b9394..483bcceee6 100644 --- a/config/production.js +++ b/config/production.js @@ -56,4 +56,41 @@ module.exports = { FILESTACK: { SUBMISSION_CONTAINER: 'topcoder-submissions-dmz', }, + SECONDARY_MENU_FOR_LOGGED_USER: [ + { + title: 'Dashboard', + href: '/my-dashboard', + }, + { + id: 'myprofile', + title: 'My Profile', + href: '/members/', + }, + { + title: 'Payments', + href: 'https://community.topcoder.com/PactsMemberServlet?module=PaymentHistory&full_list=false', + }, + ], + SECONDARY_MENU_FOR_GUEST: [ + { + title: 'Overview', + href: 'https://www.topcoder.com/about', + }, + { + title: 'How It Works', + href: 'https://www.topcoder.com/how-it-works/faqs/', + }, + { + title: 'Tracks', + href: '/community/learn', + }, + { + title: 'Why Join', + href: 'https://www.topcoder.com/about/why-crowdsourcing/', + }, + ], + ACCOUNT_MENU_SWITCH_TEXT: { + title: 'Switch to BUSINESS', + href: 'https://connect.topcoder.com', + }, }; diff --git a/src/shared/actions/contentful.js b/src/shared/actions/contentful.js index 30167f4c65..4391e85b36 100644 --- a/src/shared/actions/contentful.js +++ b/src/shared/actions/contentful.js @@ -1,6 +1,6 @@ import _ from 'lodash'; import { getService } from 'services/contentful'; -import { redux } from 'topcoder-react-utils'; +import { redux, config } from 'topcoder-react-utils'; import { removeTrailingSlash } from 'utils/url'; import { menuItemBuilder, target as urlTarget } from 'utils/contentful'; import { services } from 'topcoder-react-lib'; @@ -228,6 +228,9 @@ async function getMenuDone(menuProps) { } else { menu = menuData; } + // add the preconfigured secondary menus + menu[0].secondaryMenuForLoggedInUser = config.SECONDARY_MENU_FOR_LOGGED_USER; + menu[0].secondaryMenuForGuest = config.SECONDARY_MENU_FOR_GUEST; return { id: menuProps.id, diff --git a/src/shared/containers/Contentful/MenuLoader/index.jsx b/src/shared/containers/Contentful/MenuLoader/index.jsx index ccdf863f22..b894e430bb 100644 --- a/src/shared/containers/Contentful/MenuLoader/index.jsx +++ b/src/shared/containers/Contentful/MenuLoader/index.jsx @@ -87,18 +87,43 @@ class MenuLoaderContainer extends React.Component { openMore={openMore} setOpenMore={this.handleChangeOpenMore} loggedIn={!_.isEmpty(auth.profile)} + // profileHandle={auth.profile ? auth.profile.handle : ''} rightMenu={( )} />