aboutsummaryrefslogtreecommitdiffstats
path: root/src/containers/auth/PricingScreen.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/auth/PricingScreen.js')
-rw-r--r--src/containers/auth/PricingScreen.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/containers/auth/PricingScreen.js b/src/containers/auth/PricingScreen.js
index ff378bd8b..55811ed23 100644
--- a/src/containers/auth/PricingScreen.js
+++ b/src/containers/auth/PricingScreen.js
@@ -20,14 +20,19 @@ export default @inject('stores', 'actions') @observer class PricingScreen extend
20 } = this.props; 20 } = this.props;
21 21
22 const { activateTrialRequest } = stores.user; 22 const { activateTrialRequest } = stores.user;
23 const { defaultTrialPlan } = stores.features.features; 23 const { defaultTrialPlan, canSkipTrial } = stores.features.anonymousFeatures;
24 24
25 actions.user.activateTrial({ planId: defaultTrialPlan }); 25 if (!canSkipTrial) {
26 await activateTrialRequest._promise;
27
28 if (!activateTrialRequest.isError) {
29 stores.router.push('/'); 26 stores.router.push('/');
30 stores.user.hasCompletedSignup = true; 27 stores.user.hasCompletedSignup = true;
28 } else {
29 actions.user.activateTrial({ planId: defaultTrialPlan });
30 await activateTrialRequest._promise;
31
32 if (!activateTrialRequest.isError) {
33 stores.router.push('/');
34 stores.user.hasCompletedSignup = true;
35 }
31 } 36 }
32 } 37 }
33 38
@@ -43,7 +48,7 @@ export default @inject('stores', 'actions') @observer class PricingScreen extend
43 const { pricingConfig } = features; 48 const { pricingConfig } = features;
44 49
45 let currency = '$'; 50 let currency = '$';
46 let price = '5.99'; 51 let price = 5.99;
47 if (pricingConfig) { 52 if (pricingConfig) {
48 ({ currency } = pricingConfig); 53 ({ currency } = pricingConfig);
49 ({ price } = pricingConfig.plans.pro.yearly); 54 ({ price } = pricingConfig.plans.pro.yearly);