Skip to content

Commit

Permalink
feat: remove upgrade button
Browse files Browse the repository at this point in the history
This removes the upgrade button as default content in CourseCardActionSlot.

This is, for the moment, a Sumac-specific change.  The button is still
present in master, pending proper removal (including the component
definitions from the rest of the repository) prior to the U release by
the maintainers.  See:

#438
  • Loading branch information
arbrandes committed Dec 6, 2024
1 parent 8e0e217 commit 021f52b
Showing 1 changed file with 8 additions and 21 deletions.
29 changes: 8 additions & 21 deletions src/plugin-slots/CourseCardActionSlot/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@ import React from 'react';
import PropTypes from 'prop-types';
import { PluginSlot } from '@openedx/frontend-plugin-framework';

import { reduxHooks } from 'hooks';
import UpgradeButton from 'containers/CourseCard/components/CourseCardActions/UpgradeButton';

const CourseCardActionSlot = ({ cardId }) => {
const { isEntitlement } = reduxHooks.useCardEntitlementData(cardId);
const {
isVerified,
isExecEd2UCourse,
} = reduxHooks.useCardEnrollmentData(cardId);

return (
<PluginSlot
id="course_card_action_slot"
pluginProps={{
cardId,
}}
>
{!(isEntitlement || isVerified || isExecEd2UCourse) && <UpgradeButton cardId={cardId} />}
</PluginSlot>
);
};
const CourseCardActionSlot = ({ cardId }) => (
<PluginSlot
id="course_card_action_slot"
pluginProps={{
cardId,
}}
/>
);

CourseCardActionSlot.propTypes = {
cardId: PropTypes.string.isRequired,
Expand Down

0 comments on commit 021f52b

Please sign in to comment.