diff --git a/README.rst b/README.rst
index eba016a34..ecccd61c4 100644
--- a/README.rst
+++ b/README.rst
@@ -49,7 +49,7 @@ Environment Variables
* ``ACCOUNT_PROFILE_URL`` - The URL of the account profile page.
* ``ACCOUNT_SETTINGS_URL`` - The URL of the account settings page.
* ``AUTHN_MINIMAL_HEADER`` - A boolean flag which hides the main menu, user menu, and logged-out
-* ``ENABLE_HEADER_WITHOUT_USERNAME`` - A boolean flag which hides the username from the header
+* ``HIDE_USERNAME_IN_HEADER`` - A boolean flag which hides the username from the header
menu items when truthy. This is intended to be used in micro-frontends like
frontend-app-authentication in which these menus are considered distractions from the user's task.
diff --git a/src/DesktopHeader.jsx b/src/DesktopHeader.jsx
index 055afd82d..b9c1f0f62 100644
--- a/src/DesktopHeader.jsx
+++ b/src/DesktopHeader.jsx
@@ -19,26 +19,52 @@ class DesktopHeader extends React.Component {
super(props);
}
- userMenuWithUsername() {
- const {
- userMenu,
- avatar,
- username,
- intl,
- } = this.props;
+ renderMainMenu() {
+ const { mainMenu } = this.props;
+ // Nodes are accepted as a prop
+ if (!Array.isArray(mainMenu)) {
+ return mainMenu;
+ }
+
+ return mainMenu.map((menuItem) => {
+ const {
+ type,
+ href,
+ content,
+ submenuContent,
+ } = menuItem;
+
+ if (type === 'item') {
+ return (
+ {content}
+ );
+ }
+
+ return (
+
+ );
+ });
+ }
+
+ // Renders an optional App Menu for
+ renderAppMenu() {
+ const { appMenu } = this.props;
+ const { content: appMenuContent, menuItems } = appMenu;
return (