diff --git a/.env b/.env index 660f1ba..e83093b 100644 --- a/.env +++ b/.env @@ -35,3 +35,5 @@ ZENDESK_KEY='' HOTJAR_APP_ID='' HOTJAR_VERSION='6' HOTJAR_DEBUG='' +ACCOUNT_MICROFRONTEND_URL='' +PROFILE_MICROFRONTEND_URL='' \ No newline at end of file diff --git a/.env.development b/.env.development index 99dcc0e..84ac005 100644 --- a/.env.development +++ b/.env.development @@ -42,3 +42,6 @@ ZENDESK_KEY='' HOTJAR_APP_ID='' HOTJAR_VERSION='6' HOTJAR_DEBUG='' +// Microfrontends +ACCOUNT_MICROFRONTEND_URL='http://localhost:1997/' +PROFILE_MICROFRONTEND_URL='http://localhost:1995/u/' \ No newline at end of file diff --git a/.env.test b/.env.test index 7b67427..b0f925e 100644 --- a/.env.test +++ b/.env.test @@ -41,3 +41,6 @@ ZENDESK_KEY='test-zendesk-key' HOTJAR_APP_ID='hot-jar-app-id' HOTJAR_VERSION='6' HOTJAR_DEBUG='' +// Microfrontends +ACCOUNT_MICROFRONTEND_URL='http://localhost:1997/' +PROFILE_MICROFRONTEND_URL='http://localhost:1995/u/' \ No newline at end of file diff --git a/src/config/index.js b/src/config/index.js index 47cf334..bee223a 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -13,6 +13,9 @@ const configuration = { SESSION_COOKIE_DOMAIN: process.env.SESSION_COOKIE_DOMAIN || '', ZENDESK_KEY: process.env.ZENDESK_KEY, SUPPORT_URL: process.env.SUPPORT_URL || null, + // Microfrontends + ACCOUNT_MICROFRONTEND_URL: process.env.ACCOUNT_MICROFRONTEND_URL, + PROFILE_MICROFRONTEND_URL: process.env.PROFILE_MICROFRONTEND_URL, }; const features = {}; diff --git a/src/containers/LearnerDashboardHeader/AuthenticatedUserDropdown.jsx b/src/containers/LearnerDashboardHeader/AuthenticatedUserDropdown.jsx index 78fe741..77b4cc0 100644 --- a/src/containers/LearnerDashboardHeader/AuthenticatedUserDropdown.jsx +++ b/src/containers/LearnerDashboardHeader/AuthenticatedUserDropdown.jsx @@ -45,7 +45,7 @@ export const AuthenticatedUserDropdown = ({ username }) => { )} - + {formatMessage(messages.profile)} {isCollapsed && ( @@ -58,7 +58,7 @@ export const AuthenticatedUserDropdown = ({ username }) => { )} - + {formatMessage(messages.account)} {getConfig().ORDER_HISTORY_URL && ( diff --git a/src/containers/LearnerDashboardHeader/__snapshots__/AuthenticatedUserDropdown.test.jsx.snap b/src/containers/LearnerDashboardHeader/__snapshots__/AuthenticatedUserDropdown.test.jsx.snap index 09920d5..68b5f80 100644 --- a/src/containers/LearnerDashboardHeader/__snapshots__/AuthenticatedUserDropdown.test.jsx.snap +++ b/src/containers/LearnerDashboardHeader/__snapshots__/AuthenticatedUserDropdown.test.jsx.snap @@ -41,7 +41,7 @@ exports[`AuthenticatedUserDropdown snapshots with enterprise dashboard 1`] = ` Profile @@ -57,7 +57,7 @@ exports[`AuthenticatedUserDropdown snapshots with enterprise dashboard 1`] = ` Explore courses Account @@ -108,12 +108,12 @@ exports[`AuthenticatedUserDropdown snapshots without enterprise dashboard and ex Profile Account diff --git a/src/data/services/lms/urls.js b/src/data/services/lms/urls.js index 9832519..189beea 100644 --- a/src/data/services/lms/urls.js +++ b/src/data/services/lms/urls.js @@ -3,6 +3,8 @@ import { configuration } from 'config'; const baseUrl = `${configuration.LMS_BASE_URL}`; export const ecommerceUrl = `${configuration.ECOMMERCE_PUBLIC_URL_ROOT}`; +export const accountUrl = `${configuration.ACCOUNT_MICROFRONTEND_URL}`; +export const profileUrl = (username) => `${configuration.PROFILE_MICROFRONTEND_URL}${username}`; export const api = `${baseUrl}/api`; @@ -27,6 +29,7 @@ export const creditPurchaseUrl = (courseId) => `${ecommerceUrl}/credit/checkout/ export const creditRequestUrl = (providerId) => `${api}/credit/v1/providers/${providerId}/request`; export default StrictDict({ + accountUrl, api, baseAppUrl, courseUnenroll, @@ -36,6 +39,7 @@ export default StrictDict({ event, init, learningMfeUrl, + profileUrl, programsUrl, updateEmailSettings, });