Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Commit 61bec68

Browse files
committed
Continue
1 parent d667938 commit 61bec68

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

containers/payments/PlansSection.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ const PlansSection = () => {
105105
setCycle(subscription.Cycle || Cycle);
106106
}, [loadingSubscription, loadingPlans]);
107107

108-
if (user.isPaid) {
109-
return null;
110-
}
111-
112108
if (subscription.isManagedByMozilla) {
113109
return (
114110
<>

containers/payments/subscription/NewSubscriptionModal.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ const NewSubscriptionModal = ({
7474
const [loading, withLoading] = useLoading();
7575
const [loadingCheck, withLoadingCheck] = useLoading();
7676
const [checkResult, setCheckResult] = useState({});
77-
const { Code: couponCode } = checkResult.Coupon || {}; // Coupon can be null
77+
const { Code: couponCode, Credit = 0 } = checkResult.Coupon || {}; // Coupon can be null
78+
const creditsRemaining = (user.Credit + Credit) / 100;
7879
const [model, setModel] = useState({
7980
cycle,
8081
currency,
@@ -301,7 +302,13 @@ const NewSubscriptionModal = ({
301302
/>
302303
</>
303304
) : (
304-
<Alert>{c('Info').t`No payment is required at this time.`}</Alert>
305+
<>
306+
<Alert>{c('Info').t`No payment is required at this time.`}</Alert>
307+
{checkResult.Credit && creditsRemaining ? (
308+
<Alert>{c('Info')
309+
.t`Please note that upon clicking the Confirm button, your account will have ${creditsRemaining} credits remaining.`}</Alert>
310+
) : null}
311+
</>
305312
)}
306313
</div>
307314
<div className="w25 onmobile-w100">

0 commit comments

Comments
 (0)