{
+ const { formatMessage } = useIntl();
+ const { width } = useWindowSize();
+ const isMobile = width <= breakpoints.small.maxWidth;
+
+ if (getConfig().ENABLE_EDX_PERSONAL_DASHBOARD) {
+ if (!isMobile) {
+ return (
+ <>
+ { hasEnterpriseAccount &&
{formatMessage(messages.dashboardSwitch)} }
+
+ {formatMessage(hasEnterpriseAccount ? messages.dashboardPersonal : messages.dashboard)}
+
+ { hasEnterpriseAccount && (
+
+ {enterpriseOrg} {formatMessage(messages.dashboard)}
+
+ )}
+ {hasEnterpriseAccount &&
}
+ >
+ );
+ }
+ return (
+ <>
+
+
+ {formatMessage(messages.dashboardPersonal)}
+
+
+ {hasEnterpriseAccount && (
+
+
+ {enterpriseOrg} {formatMessage(messages.dashboard)}
+
+
+ )}
+ >
+ );
+ }
+ return null;
+};
+
+UserDashboardMenu.defaultProps = {
+ enterpriseOrg: null,
+ enterpriseSrc: null,
+ hasEnterpriseAccount: false,
+};
+
+UserDashboardMenu.propTypes = {
+ enterpriseOrg: PropTypes.string,
+ enterpriseSrc: PropTypes.string,
+ hasEnterpriseAccount: PropTypes.bool,
+};
+
+export default UserDashboardMenu;
diff --git a/src/common/UserDashboardMenu/index.test.jsx b/src/common/UserDashboardMenu/index.test.jsx
new file mode 100644
index 000000000..f419e1e74
--- /dev/null
+++ b/src/common/UserDashboardMenu/index.test.jsx
@@ -0,0 +1,42 @@
+import React from 'react';
+import { mergeConfig } from '@edx/frontend-platform';
+import { injectIntl, IntlProvider } from '@edx/frontend-platform/i18n';
+import {
+ screen,
+ render,
+} from '@testing-library/react';
+
+import UserDashboardMenu from './index'; // eslint-disable-line
+
+mergeConfig({ ENABLE_EDX_PERSONAL_DASHBOARD: true });
+const IntlUserDashboardMenu = injectIntl(UserDashboardMenu);
+
+describe('User Dashboard Menu', () => {
+ const Wrapper = children => (
+ // eslint-disable-next-line react/jsx-filename-extension
+
+ {children}
+
+ );
+
+ it('should render enterprise dashboard menu in the user menu dropdown', () => {
+ render(Wrapper(
));
+
+ const dashboardSwitchMenu = screen.getByText('SWITCH DASHBOARD');
+ const personalDashboard = screen.getByText('Personal');
+ const enterpriseDashboard = screen.getByText('Fake Enterprise Dashboard');
+ expect(dashboardSwitchMenu).toBeTruthy();
+ expect(personalDashboard).toBeTruthy();
+ expect(enterpriseDashboard).toBeTruthy();
+ });
+ it('should render only one dashboard menu in the user menu dropdown when not enterprise user', () => {
+ render(Wrapper(
));
+
+ const personalDashboard = screen.getByText('Dashboard');
+ expect(personalDashboard).toBeTruthy();
+ });
+});
diff --git a/src/common/UserDashboardMenu/messages.js b/src/common/UserDashboardMenu/messages.js
new file mode 100644
index 000000000..65d1b171e
--- /dev/null
+++ b/src/common/UserDashboardMenu/messages.js
@@ -0,0 +1,21 @@
+import { defineMessages } from '@edx/frontend-platform/i18n';
+
+const messages = defineMessages({
+ dashboard: {
+ id: 'learnerVariantDashboard.menu.dashboard.label',
+ defaultMessage: 'Dashboard',
+ description: 'The text for the user menu Dashboard navigation link.',
+ },
+ dashboardPersonal: {
+ id: 'learnerVariantDashboard.menu.dashboardPersonal.label',
+ defaultMessage: 'Personal',
+ description: 'Link to personal dashboard in user menu',
+ },
+ dashboardSwitch: {
+ id: 'learnerVariantDashboard.menu.dashboardSwitch.label',
+ defaultMessage: 'SWITCH DASHBOARD',
+ description: 'Switch Dashboard header in the user menu',
+ },
+});
+
+export default messages;
diff --git a/src/plugin-slots/UserMenuGroupSlot/README.md b/src/plugin-slots/UserMenuGroupSlot/README.md
index 47dbc65dc..dc63c94c9 100644
--- a/src/plugin-slots/UserMenuGroupSlot/README.md
+++ b/src/plugin-slots/UserMenuGroupSlot/README.md
@@ -15,8 +15,11 @@ for both mobile and desktop screens.
**Default Behaviour:**
-Desktop:
-
+Desktop (non-enterprise):
+
+
+Desktop (enterprise):
+
Mobile:

diff --git a/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop.png b/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop.png
deleted file mode 100644
index ad26802ce..000000000
Binary files a/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop.png and /dev/null differ
diff --git a/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop_enterprise.png b/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop_enterprise.png
new file mode 100644
index 000000000..260c88ccf
Binary files /dev/null and b/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop_enterprise.png differ
diff --git a/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop_non_enterprise.png b/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop_non_enterprise.png
new file mode 100644
index 000000000..046b8cb62
Binary files /dev/null and b/src/plugin-slots/UserMenuGroupSlot/images/default_user_menu_desktop_non_enterprise.png differ
diff --git a/src/plugin-slots/UserMenuGroupSlot/index.jsx b/src/plugin-slots/UserMenuGroupSlot/index.jsx
index 8a06242e0..d6ffbabe8 100644
--- a/src/plugin-slots/UserMenuGroupSlot/index.jsx
+++ b/src/plugin-slots/UserMenuGroupSlot/index.jsx
@@ -1,11 +1,31 @@
import React from 'react';
+import PropTypes from 'prop-types';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
+import UserDashboardMenu from '../../common/UserDashboardMenu';
-const UserMenuGroupSlot = () => (
+const UserMenuGroupSlot = ({ hasEnterpriseAccount, logoAltText, logoDestination }) => (
+ >
+
+
);
+UserMenuGroupSlot.defaultProps = {
+ hasEnterpriseAccount: false,
+ logoAltText: '',
+ logoDestination: '',
+};
+
+UserMenuGroupSlot.propTypes = {
+ hasEnterpriseAccount: PropTypes.bool,
+ logoAltText: PropTypes.string,
+ logoDestination: PropTypes.string,
+};
+
export default UserMenuGroupSlot;