diff --git a/src/subscriptions/Subscriptions.jsx b/src/subscriptions/Subscriptions.jsx index ef777f4f..ac01f6b2 100644 --- a/src/subscriptions/Subscriptions.jsx +++ b/src/subscriptions/Subscriptions.jsx @@ -1,16 +1,14 @@ -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 { 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 +18,7 @@ const Subscriptions = () => { const dispatch = useDispatch(); const { subscriptions, - stripeCustomerPortalURL, stripeError, - stripeLoading, } = useSelector(subscriptionsSelector); const hasSubscriptions = subscriptions.length > 0; const activeCount = subscriptions.filter( @@ -39,25 +35,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 = () => ( -