Skip to content

Commit

Permalink
feat: remove edX-specific code and add by plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
syedsajjadkazmii authored and mubbsharanwar committed Jul 25, 2024
1 parent 09691d2 commit eddb511
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 42 deletions.
88 changes: 85 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/browserslist-config": "^1.1.0",
"@edx/frontend-component-footer": "13.1.0",
"@edx/frontend-component-header": "^5.3.1",
"@edx/frontend-enterprise-hotjar": "3.0.0",
"@edx/frontend-platform": "8.1.0",
Expand Down
38 changes: 0 additions & 38 deletions src/containers/LearnerDashboardHeader/LearnerDashboardMenu.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import { sendTrackEvent } from '@edx/frontend-platform/analytics';
import { getConfig } from '@edx/frontend-platform';
import { Badge } from '@openedx/paragon';
import _ from 'lodash';

import urls from 'data/services/lms/urls';

Expand Down Expand Up @@ -43,44 +40,9 @@ const getLearnerHeaderMenu = (
},
],
userMenu: [
...(getConfig().ENABLE_EDX_PERSONAL_DASHBOARD ? [
{
heading: formatMessage(messages.dashboardSwitch),
items: [
{
type: 'item',
href: '/edx-dashboard',
content: formatMessage(messages.dashboardPersonal),
isActive: true,
},
...(!_.isEmpty(dashboard) ? [{
type: 'item',
href: `${dashboard.url}`,
content: `${dashboard.label} ${formatMessage(messages.dashboard)}`,
}] : []),
],
},
] : []),
{
heading: '',
items: [
...(_.isEmpty(dashboard) && getConfig().CAREER_LINK_URL ? [{
type: 'item',
href: `${getConfig().CAREER_LINK_URL}`,
content:
<>
{formatMessage(messages.career)}
<Badge className="px-2 mx-2" variant="warning">
{formatMessage(messages.newAlert)}
</Badge>
</>,
onClick: () => {
sendTrackEvent(
'edx.bi.user.menu.career.clicked',
{ category: 'header', label: 'header' },
);
},
}] : []),
{
type: 'item',
href: `${getConfig().ACCOUNT_PROFILE_URL}/u/${authenticatedUser?.username}`,
Expand Down

0 comments on commit eddb511

Please sign in to comment.