Skip to content

Commit

Permalink
fixup!: Add placement param to ProgressTabCertificateStatusSlot
Browse files Browse the repository at this point in the history
  • Loading branch information
xitij2000 committed Nov 25, 2024
1 parent c3c0050 commit 70b6f6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/course-home/progress-tab/ProgressTab.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const ProgressTab = () => {
{/* Main body */}
<div className="col-12 col-md-8 p-0">
{!disableProgressGraph && <CourseCompletion />}
{!wideScreen && <ProgressTabCertificateStatusSlot courseId={courseId} />}
{!wideScreen && <ProgressTabCertificateStatusSlot courseId={courseId} placement="MAIN_BODY" />}
<ProgressTabCourseGradeSlot courseId={courseId} />
<ProgressTabGradeBreakdownSlot courseId={courseId} />
</div>

{/* Side panel */}
<div className="col-12 col-md-4 p-0 px-md-4">
{wideScreen && <ProgressTabCertificateStatusSlot courseId={courseId} />}
{wideScreen && <ProgressTabCertificateStatusSlot courseId={courseId} placement="SIDEBAR" />}
<ProgressTabRelatedLinksSlot courseId={courseId} />
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/plugin-slots/ProgressTabCertificateStatusSlot/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ import PropTypes from 'prop-types';
import { PluginSlot } from '@openedx/frontend-plugin-framework';
import CertificateStatus from '../../course-home/progress-tab/certificate-status/CertificateStatus';

const ProgressTabCertificateStatusSlot = ({ courseId }) => (
const ProgressTabCertificateStatusSlot = ({ courseId, placement }) => (
<PluginSlot
id="progress_tab_certificate_status_slot"
pluginProps={{
courseId,
placement,
}}
>
<CertificateStatus />
Expand All @@ -15,6 +16,7 @@ const ProgressTabCertificateStatusSlot = ({ courseId }) => (

ProgressTabCertificateStatusSlot.propTypes = {
courseId: PropTypes.string.isRequired,
placement: PropTypes.oneOf(['MAIN_BODY', 'SIDEBAR']),
};

export default ProgressTabCertificateStatusSlot;

0 comments on commit 70b6f6e

Please sign in to comment.