feat: remove upgrade button
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: https://github.com/openedx/frontend-app-learner-dashboard/issues/438
This commit is contained in:
committed by
Adolfo R. Brandes
parent
8e0e217402
commit
021f52b303
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user