From 250b118c50822243109082f5988faef0df5c333c Mon Sep 17 00:00:00 2001 From: Emma Green Date: Wed, 10 Mar 2021 14:33:26 -0500 Subject: [PATCH] add access expiration stuff --- src/course-home/outline-tab/messages.js | 4 ---- .../outline-tab/widgets/UpgradeCard.jsx | 24 +++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/course-home/outline-tab/messages.js b/src/course-home/outline-tab/messages.js index c2f1ff96..051ac1d0 100644 --- a/src/course-home/outline-tab/messages.js +++ b/src/course-home/outline-tab/messages.js @@ -90,10 +90,6 @@ const messages = defineMessages({ id: 'learning.outline.upgradeTitle', defaultMessage: 'Pursue a verified certificate', }, - upsellFirstPurchaseDiscount: { - id: 'learning.outline.upsellFirstPurchaseDiscount', - defaultMessage: '15% First-Time Learner Discount', - }, certAlt: { id: 'learning.outline.certificateAlt', defaultMessage: 'Example Certificate', diff --git a/src/course-home/outline-tab/widgets/UpgradeCard.jsx b/src/course-home/outline-tab/widgets/UpgradeCard.jsx index 61880b5f..bc0b1448 100644 --- a/src/course-home/outline-tab/widgets/UpgradeCard.jsx +++ b/src/course-home/outline-tab/widgets/UpgradeCard.jsx @@ -2,6 +2,8 @@ import React, { useEffect } from 'react'; import PropTypes from 'prop-types'; import { faCheck } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { Icon } from '@edx/paragon'; +import { Check } from '@edx/paragon/icons'; import { sendTrackEvent, sendTrackingLogEvent } from '@edx/frontend-platform/analytics'; import { FormattedDate, FormattedMessage, injectIntl } from '@edx/frontend-platform/i18n'; @@ -251,6 +253,28 @@ function UpgradeCard({ courseId }) { ...eventProperties, }; + function expirationHighlight(hoursToExpiration){ + let expirationText; + if(hoursToExpiration < 24){ + expirationText= + } else { + expirationText = + } + return(
{expirationText}
) + } + useEffect(() => { sendTrackingLogEvent('edx.bi.course.upgrade.sidebarupsell.displayed', eventProperties); sendTrackEvent('Promotion Viewed', promotionEventProperties);