From e26aa4133475d9e6180a022147c431cab43c697f Mon Sep 17 00:00:00 2001 From: asadiqbal08 Date: Wed, 27 Oct 2021 14:33:09 +0500 Subject: [PATCH] Removed the enterprise-specific code --- src/index.scss | 4 +-- .../AuthenticatedUserDropdown.jsx | 29 +++---------------- src/learning-header/Header.jsx | 18 ------------ 3 files changed, 5 insertions(+), 46 deletions(-) diff --git a/src/index.scss b/src/index.scss index 9316676353..8d5d162541 100644 --- a/src/index.scss +++ b/src/index.scss @@ -27,8 +27,7 @@ $white: #fff; .learning-header { min-width: 0; - background-color: red; - + .course-title-lockup { min-width: 0; @@ -43,7 +42,6 @@ $white: #fff; .user-dropdown { .btn { height: 3rem; - background: red; @media (max-width: -1 + map-get($grid-breakpoints, "sm")) { padding: 0 0.5rem; } diff --git a/src/learning-header/AuthenticatedUserDropdown.jsx b/src/learning-header/AuthenticatedUserDropdown.jsx index f5257b24d1..9f6ce557c8 100644 --- a/src/learning-header/AuthenticatedUserDropdown.jsx +++ b/src/learning-header/AuthenticatedUserDropdown.jsx @@ -10,19 +10,13 @@ import { Dropdown } from '@edx/paragon'; import messages from './messages'; -function AuthenticatedUserDropdown({ enterpriseLearnerPortalLink, intl, username }) { +function AuthenticatedUserDropdown({ intl, username }) { let dashboardMenuItem = ( {intl.formatMessage(messages.dashboard)} ); - if (enterpriseLearnerPortalLink && Object.keys(enterpriseLearnerPortalLink).length > 0) { - dashboardMenuItem = ( - - {enterpriseLearnerPortalLink.content} - - ); - } + return ( <> {intl.formatMessage(messages.help)} @@ -41,15 +35,9 @@ function AuthenticatedUserDropdown({ enterpriseLearnerPortalLink, intl, username {intl.formatMessage(messages.account)} - {!enterpriseLearnerPortalLink && ( - // Users should only see Order History if they do not have an available - // learner portal, because an available learner portal currently means - // that they access content via Subscriptions, in which context an "order" - // is not relevant. - + {intl.formatMessage(messages.orderHistory)} - - )} + {intl.formatMessage(messages.signOut)} @@ -62,15 +50,6 @@ function AuthenticatedUserDropdown({ enterpriseLearnerPortalLink, intl, username AuthenticatedUserDropdown.propTypes = { intl: intlShape.isRequired, username: PropTypes.string.isRequired, - enterpriseLearnerPortalLink: PropTypes.shape({ - type: PropTypes.string, - href: PropTypes.string, - content: PropTypes.string, - }), -}; - -AuthenticatedUserDropdown.defaultProps = { - enterpriseLearnerPortalLink: undefined, }; export default injectIntl(AuthenticatedUserDropdown); diff --git a/src/learning-header/Header.jsx b/src/learning-header/Header.jsx index 587a8c42c7..b0f3175501 100644 --- a/src/learning-header/Header.jsx +++ b/src/learning-header/Header.jsx @@ -1,6 +1,5 @@ import React, { useContext } from 'react'; import PropTypes from 'prop-types'; -import { useEnterpriseConfig } from '@edx/frontend-enterprise-utils'; import { getConfig } from '@edx/frontend-platform'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { AppContext } from '@edx/frontend-platform/react'; @@ -33,12 +32,6 @@ function Header({ }) { const { authenticatedUser } = useContext(AppContext); - const { enterpriseLearnerPortalLink, enterpriseCustomerBrandingConfig } = useEnterpriseConfig( - authenticatedUser, - getConfig().ENTERPRISE_LEARNER_PORTAL_HOSTNAME, - getConfig().LMS_BASE_URL, - ); - let headerLogo = ( ); - if (enterpriseCustomerBrandingConfig && Object.keys(enterpriseCustomerBrandingConfig).length > 0) { - headerLogo = ( - - ); - } return (
@@ -69,7 +52,6 @@ function Header({ {showUserDropdown && authenticatedUser && ( )}