fix: update menu item link for account and profile

This commit is contained in:
nsprenkle
2023-03-07 17:14:18 -05:00
parent 3c7be4c65c
commit 496a1c7de5
3 changed files with 9 additions and 2 deletions

View File

@@ -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 = {};

View File

@@ -45,7 +45,7 @@ export const AuthenticatedUserDropdown = ({ username }) => {
</Dropdown.Item>
)}
<Dropdown.Divider />
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/u/${username}`}>
<Dropdown.Item href={urls.profileUrl(username)}>
{formatMessage(messages.profile)}
</Dropdown.Item>
{isCollapsed && (
@@ -58,7 +58,7 @@ export const AuthenticatedUserDropdown = ({ username }) => {
</Dropdown.Item>
</>
)}
<Dropdown.Item href={`${getConfig().LMS_BASE_URL}/account/settings`}>
<Dropdown.Item href={urls.accountUrl}>
{formatMessage(messages.account)}
</Dropdown.Item>
{getConfig().ORDER_HISTORY_URL && (

View File

@@ -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,
});