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

Commit c309b7f

Browse files
committed
Continue
1 parent 4e65eb7 commit c309b7f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

containers/payments/subscription/NewSubscriptionModal.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ const NewSubscriptionModal = ({
4848
currency = DEFAULT_CURRENCY,
4949
coupon,
5050
planIDs = {},
51+
onClose,
5152
...rest
5253
}) => {
5354
const TITLE = {
@@ -142,6 +143,15 @@ const NewSubscriptionModal = ({
142143
setStep(STEPS.PAYMENT);
143144
};
144145

146+
const handleClose = (e) => {
147+
if (step === STEPS.PAYMENT) {
148+
setStep(STEPS.CUSTOMIZATION);
149+
return;
150+
}
151+
152+
onClose(e);
153+
};
154+
145155
useEffect(() => {
146156
withLoadingCheck(check());
147157
}, [model.cycle, model.planIDs]);
@@ -160,6 +170,7 @@ const NewSubscriptionModal = ({
160170
className="pm-modal--full subscription-modal"
161171
title={TITLE[step]}
162172
loading={loading || loadingPlans || loadingVpnCountries}
173+
onClose={handleClose}
163174
{...rest}
164175
>
165176
{step === STEPS.CUSTOMIZATION && (

0 commit comments

Comments
 (0)