Skip to content

Commit

Permalink
feat: show unenrollment button for executive education courses (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
jajjibhai008 authored Aug 11, 2023
2 parents be8cb85 + be2258e commit 86a4573
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ exports[`CourseCardMenu default snapshot 1`] = `
<Dropdown.Toggle
alt="Course actions dropdown"
as="IconButton"
disabled={false}
iconAs="Icon"
id="course-actions-dropdown-test-card-id"
src={[MockFunction icons.MoreVert]}
Expand Down Expand Up @@ -70,7 +69,6 @@ exports[`CourseCardMenu masquerading snapshot 1`] = `
<Dropdown.Toggle
alt="Course actions dropdown"
as="IconButton"
disabled={false}
iconAs="Icon"
id="course-actions-dropdown-test-card-id"
src={[MockFunction icons.MoreVert]}
Expand Down
7 changes: 3 additions & 4 deletions src/containers/CourseCard/components/CourseCardMenu/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export const CourseCardMenu = ({ cardId }) => {
iconAs={Icon}
variant="primary"
alt={formatMessage(messages.dropdownAlt)}
disabled={isExecutiveEd2uCourse}
/>
<Dropdown.Menu>
{showUnenrollItem && (
Expand All @@ -64,7 +63,7 @@ export const CourseCardMenu = ({ cardId }) => {
{formatMessage(messages.unenroll)}
</Dropdown.Item>
)}
{isEmailEnabled && (
{(isEmailEnabled && !isExecutiveEd2uCourse) && (
<Dropdown.Item
disabled={isMasquerading}
onClick={emailSettingsModal.show}
Expand All @@ -73,7 +72,7 @@ export const CourseCardMenu = ({ cardId }) => {
{formatMessage(messages.emailSettings)}
</Dropdown.Item>
)}
{facebook.isEnabled && (
{(facebook.isEnabled && !isExecutiveEd2uCourse) && (
<ReactShare.FacebookShareButton
url={facebook.shareUrl}
onClick={handleFacebookShare}
Expand All @@ -87,7 +86,7 @@ export const CourseCardMenu = ({ cardId }) => {
{formatMessage(messages.shareToFacebook)}
</ReactShare.FacebookShareButton>
)}
{twitter.isEnabled && (
{(twitter.isEnabled && !isExecutiveEd2uCourse) && (
<ReactShare.TwitterShareButton
url={twitter.shareUrl}
onClick={handleTwitterShare}
Expand Down

0 comments on commit 86a4573

Please sign in to comment.