diff options
author | 2021-07-17 20:32:22 +0530 | |
---|---|---|
committer | 2021-07-20 16:02:15 +0000 | |
commit | 45373f655f68fdd0b320cde175b6108454ad4731 (patch) | |
tree | c1ccb0c73639d754b68a36a1977b74471fe4b566 /src/containers/auth/PricingScreen.js | |
parent | New Crowdin updates (#1668) (diff) | |
download | ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.tar.gz ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.tar.zst ferdium-app-45373f655f68fdd0b320cde175b6108454ad4731.zip |
Removed Franz paid plans features:
- serviceLimit
- planSelection
- trialStatusBar
and other Franz features that were for different tiers of subscription.
Diffstat (limited to 'src/containers/auth/PricingScreen.js')
-rw-r--r-- | src/containers/auth/PricingScreen.js | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/src/containers/auth/PricingScreen.js b/src/containers/auth/PricingScreen.js deleted file mode 100644 index 97bf1f6be..000000000 --- a/src/containers/auth/PricingScreen.js +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | import React, { Component } from 'react'; | ||
2 | import PropTypes from 'prop-types'; | ||
3 | import { inject, observer } from 'mobx-react'; | ||
4 | import { RouterStore } from 'mobx-react-router'; | ||
5 | |||
6 | import Pricing from '../../components/auth/Pricing'; | ||
7 | import UserStore from '../../stores/UserStore'; | ||
8 | |||
9 | import { globalError as globalErrorPropType } from '../../prop-types'; | ||
10 | import FeaturesStore from '../../stores/FeaturesStore'; | ||
11 | |||
12 | export default @inject('stores', 'actions') @observer class PricingScreen extends Component { | ||
13 | static propTypes = { | ||
14 | error: globalErrorPropType.isRequired, | ||
15 | }; | ||
16 | |||
17 | async submit() { | ||
18 | const { | ||
19 | actions, | ||
20 | stores, | ||
21 | } = this.props; | ||
22 | |||
23 | const { activateTrialRequest } = stores.user; | ||
24 | const { defaultTrialPlan, canSkipTrial } = stores.features.anonymousFeatures; | ||
25 | |||
26 | if (!canSkipTrial) { | ||
27 | stores.router.push('/'); | ||
28 | stores.user.hasCompletedSignup = true; | ||
29 | } else { | ||
30 | actions.user.activateTrial({ planId: defaultTrialPlan }); | ||
31 | await activateTrialRequest._promise; | ||
32 | |||
33 | if (!activateTrialRequest.isError) { | ||
34 | stores.router.push('/'); | ||
35 | stores.user.hasCompletedSignup = true; | ||
36 | } | ||
37 | } | ||
38 | } | ||
39 | |||
40 | render() { | ||
41 | const { | ||
42 | error, | ||
43 | stores, | ||
44 | } = this.props; | ||
45 | |||
46 | const { getUserInfoRequest, activateTrialRequest, data } = stores.user; | ||
47 | const { featuresRequest, features } = stores.features; | ||
48 | |||
49 | const { pricingConfig } = features; | ||
50 | |||
51 | let currency = '$'; | ||
52 | let price = 5.99; | ||
53 | if (pricingConfig) { | ||
54 | ({ currency } = pricingConfig); | ||
55 | ({ price } = pricingConfig.plans.pro.yearly); | ||
56 | } | ||
57 | |||
58 | return ( | ||
59 | <Pricing | ||
60 | onSubmit={this.submit.bind(this)} | ||
61 | isLoadingRequiredData={(getUserInfoRequest.isExecuting || !getUserInfoRequest.wasExecuted) || (featuresRequest.isExecuting || !featuresRequest.wasExecuted)} | ||
62 | isActivatingTrial={activateTrialRequest.isExecuting} | ||
63 | trialActivationError={activateTrialRequest.isError} | ||
64 | canSkipTrial={features.canSkipTrial} | ||
65 | error={error} | ||
66 | currency={currency} | ||
67 | price={price} | ||
68 | name={data.firstname} | ||
69 | /> | ||
70 | ); | ||
71 | } | ||
72 | } | ||
73 | |||
74 | PricingScreen.wrappedComponent.propTypes = { | ||
75 | actions: PropTypes.shape({ | ||
76 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
77 | }).isRequired, | ||
78 | stores: PropTypes.shape({ | ||
79 | user: PropTypes.instanceOf(UserStore).isRequired, | ||
80 | router: PropTypes.instanceOf(RouterStore).isRequired, | ||
81 | features: PropTypes.instanceOf(FeaturesStore).isRequired, | ||
82 | }).isRequired, | ||
83 | }; | ||