Skip to content

Commit

Permalink
fix: remove retake course prompt on completed course cards for EE cou…
Browse files Browse the repository at this point in the history
…rses (#1124)
  • Loading branch information
jajjibhai008 committed Jul 22, 2024
1 parent b756e97 commit d5ee30f
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ContinueLearningButton from './ContinueLearningButton';

import { isCourseEnded } from '../../../../../utils/common';
import CertificateImg from './images/edx-verified-mini-cert.png';
import { EXECUTIVE_EDUCATION_COURSE_MODES } from '../../../../app/data';

const CompletedCourseCard = (props) => {
const { authenticatedUser: { username } } = useContext(AppContext);
Expand Down Expand Up @@ -38,7 +39,7 @@ const CompletedCourseCard = (props) => {
/>
);
};

const isExecutiveEducation2UCourse = EXECUTIVE_EDUCATION_COURSE_MODES.includes(mode);
const renderCertificateInfo = () => (
props.linkToCertificate ? (
<div className="d-flex mb-3">
Expand All @@ -55,12 +56,14 @@ const CompletedCourseCard = (props) => {
</div>
</div>
) : (
<p className="mb-3 mt-2 small">
To earn a certificate,{' '}
<a href={props.linkToCourse}>
retake this course →
</a>
</p>
!isExecutiveEducation2UCourse && (
<p className="mb-3 mt-2 small">
To earn a certificate,{' '}
<a href={props.linkToCourse}>
retake this course →
</a>
</p>
)
)
);

Expand Down

0 comments on commit d5ee30f

Please sign in to comment.