From d306bd2abab707444e90b6d89cb616ef089856de Mon Sep 17 00:00:00 2001 From: julianajlk Date: Tue, 30 Jul 2024 12:32:44 -0400 Subject: [PATCH] fix: Remove Manage my subscriptions CTA --- src/subscriptions/Subscriptions.jsx | 33 ++--------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/src/subscriptions/Subscriptions.jsx b/src/subscriptions/Subscriptions.jsx index ef777f4f..eb622c28 100644 --- a/src/subscriptions/Subscriptions.jsx +++ b/src/subscriptions/Subscriptions.jsx @@ -1,16 +1,13 @@ -import React, { useEffect } from 'react'; +import React from 'react'; import { useDispatch, useSelector } from 'react-redux'; -import { sendTrackEvent } from '@edx/frontend-platform/analytics'; import { FormattedMessage, useIntl } from '@edx/frontend-platform/i18n'; -import { StatefulButton } from '@edx/paragon'; -import { Launch, SpinnerSimple } from '@edx/paragon/icons'; import { BasicAlert } from '../components'; import SubscriptionCardsView from './SubscriptionCardsView'; import SubscriptionUpsell from './SubscriptionUpsell'; -import { clearStripeError, fetchStripeCustomerPortalURL } from './actions'; +import { clearStripeError } from './actions'; import { subscriptionsSelector } from './selectors'; import messages from './Subscriptions.messages'; @@ -20,9 +17,7 @@ const Subscriptions = () => { const dispatch = useDispatch(); const { subscriptions, - stripeCustomerPortalURL, stripeError, - stripeLoading, } = useSelector(subscriptionsSelector); const hasSubscriptions = subscriptions.length > 0; const activeCount = subscriptions.filter( @@ -39,25 +34,10 @@ const Subscriptions = () => { messages['ecommerce.order.history.subscriptions.manage.button'], ); - const handleManageSubscriptionsClick = () => { - sendTrackEvent('edx.bi.user.subscription.order-page.manage.clicked'); - dispatch(fetchStripeCustomerPortalURL()); - }; - const handeAlertClose = () => { dispatch(clearStripeError()); }; - useEffect(() => { - if (stripeCustomerPortalURL) { - window.open(stripeCustomerPortalURL, '_blank', 'noopener,noreferrer'); - } - }, [stripeCustomerPortalURL]); - - const renderSpinner = () => ( -
{SpinnerSimple()}
- ); - const renderEmpty = () => ( <> { buttonLabel: {buttonLabel}, })} -