From 45373f655f68fdd0b320cde175b6108454ad4731 Mon Sep 17 00:00:00 2001 From: Vijay A Date: Sat, 17 Jul 2021 20:32:22 +0530 Subject: Removed Franz paid plans features: - serviceLimit - planSelection - trialStatusBar and other Franz features that were for different tiers of subscription. --- src/containers/auth/PricingScreen.js | 83 ----------------------------- src/containers/auth/SetupAssistantScreen.js | 9 ++-- src/containers/auth/SignupScreen.js | 11 +--- 3 files changed, 4 insertions(+), 99 deletions(-) delete mode 100644 src/containers/auth/PricingScreen.js (limited to 'src/containers/auth') 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 @@ -import React, { Component } from 'react'; -import PropTypes from 'prop-types'; -import { inject, observer } from 'mobx-react'; -import { RouterStore } from 'mobx-react-router'; - -import Pricing from '../../components/auth/Pricing'; -import UserStore from '../../stores/UserStore'; - -import { globalError as globalErrorPropType } from '../../prop-types'; -import FeaturesStore from '../../stores/FeaturesStore'; - -export default @inject('stores', 'actions') @observer class PricingScreen extends Component { - static propTypes = { - error: globalErrorPropType.isRequired, - }; - - async submit() { - const { - actions, - stores, - } = this.props; - - const { activateTrialRequest } = stores.user; - const { defaultTrialPlan, canSkipTrial } = stores.features.anonymousFeatures; - - if (!canSkipTrial) { - stores.router.push('/'); - stores.user.hasCompletedSignup = true; - } else { - actions.user.activateTrial({ planId: defaultTrialPlan }); - await activateTrialRequest._promise; - - if (!activateTrialRequest.isError) { - stores.router.push('/'); - stores.user.hasCompletedSignup = true; - } - } - } - - render() { - const { - error, - stores, - } = this.props; - - const { getUserInfoRequest, activateTrialRequest, data } = stores.user; - const { featuresRequest, features } = stores.features; - - const { pricingConfig } = features; - - let currency = '$'; - let price = 5.99; - if (pricingConfig) { - ({ currency } = pricingConfig); - ({ price } = pricingConfig.plans.pro.yearly); - } - - return ( - - ); - } -} - -PricingScreen.wrappedComponent.propTypes = { - actions: PropTypes.shape({ - user: PropTypes.instanceOf(UserStore).isRequired, - }).isRequired, - stores: PropTypes.shape({ - user: PropTypes.instanceOf(UserStore).isRequired, - router: PropTypes.instanceOf(RouterStore).isRequired, - features: PropTypes.instanceOf(FeaturesStore).isRequired, - }).isRequired, -}; diff --git a/src/containers/auth/SetupAssistantScreen.js b/src/containers/auth/SetupAssistantScreen.js index 2a8f2c010..eaf3fda8a 100644 --- a/src/containers/auth/SetupAssistantScreen.js +++ b/src/containers/auth/SetupAssistantScreen.js @@ -12,6 +12,7 @@ import RecipesStore from '../../stores/RecipesStore'; import UserStore from '../../stores/UserStore'; export default @inject('stores', 'actions') @observer class SetupAssistantScreen extends Component { + // TODO: Why are these hardcoded here? Do they need to conform to specific services in the packaged recipes? If so, its more important to fix this services = { whatsapp: { name: 'WhatsApp', @@ -56,14 +57,14 @@ export default @inject('stores', 'actions') @observer class SetupAssistantScreen } async setupServices(serviceConfig) { - const { stores: { services, router, user } } = this.props; + const { stores: { services } } = this.props; console.log(serviceConfig); this.setState({ isSettingUpServices: true, }); - // The store requests are not build for paralell requests so we need to finish one request after another + // The store requests are not build for parallel requests so we need to finish one request after another for (const config of serviceConfig) { const serviceData = { name: this.services[config.id].name, @@ -96,10 +97,6 @@ export default @inject('stores', 'actions') @observer class SetupAssistantScreen this.setState({ isSettingUpServices: false, }); - - await sleep(100); - - router.push(user.pricingRoute); } render() { diff --git a/src/containers/auth/SignupScreen.js b/src/containers/auth/SignupScreen.js index 42ee09f33..eeab63a0c 100644 --- a/src/containers/auth/SignupScreen.js +++ b/src/containers/auth/SignupScreen.js @@ -14,16 +14,7 @@ export default @inject('stores', 'actions') @observer class SignupScreen extends }; onSignup(values) { - const { actions, stores } = this.props; - - const { canSkipTrial, defaultTrialPlan, pricingConfig } = stores.features.anonymousFeatures; - - if (!canSkipTrial) { - Object.assign(values, { - plan: defaultTrialPlan, - currency: pricingConfig.currencyID, - }); - } + const { actions } = this.props; actions.user.signup(values); } -- cgit v1.2.3-70-g09d2