aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2019-09-07 00:05:46 +0200
committerLibravatar Stefan Malzner <stefan@adlk.io>2019-09-07 00:05:46 +0200
commit31d2d5a11cbf9f6fd41bff273aad1d23e014caa8 (patch)
treea185ed33e104844737a2a22015110463254b6583 /src/components/ui
parentUpdate CHANGELOG.md (diff)
downloadferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.tar.gz
ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.tar.zst
ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.zip
Make trial activation more obvious
Diffstat (limited to 'src/components/ui')
-rw-r--r--src/components/ui/ActivateTrialButton/index.js24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/components/ui/ActivateTrialButton/index.js b/src/components/ui/ActivateTrialButton/index.js
index c3e5f4a6f..151d7cc6d 100644
--- a/src/components/ui/ActivateTrialButton/index.js
+++ b/src/components/ui/ActivateTrialButton/index.js
@@ -5,9 +5,11 @@ import { defineMessages, intlShape } from 'react-intl';
5import classnames from 'classnames'; 5import classnames from 'classnames';
6 6
7import { Button } from '@meetfranz/forms'; 7import { Button } from '@meetfranz/forms';
8import { H2 } from '@meetfranz/ui';
8import { gaEvent } from '../../../lib/analytics'; 9import { gaEvent } from '../../../lib/analytics';
9 10
10import UserStore from '../../../stores/UserStore'; 11import UserStore from '../../../stores/UserStore';
12import FeatureItem from '../FeatureItem';
11 13
12const messages = defineMessages({ 14const messages = defineMessages({
13 action: { 15 action: {
@@ -26,13 +28,23 @@ const messages = defineMessages({
26 id: 'feature.delayApp.trial.actionShort', 28 id: 'feature.delayApp.trial.actionShort',
27 defaultMessage: '!!!Activate the free Franz Professional trial', 29 defaultMessage: '!!!Activate the free Franz Professional trial',
28 }, 30 },
31 noStringsAttachedHeadline: {
32 id: 'pricing.trial.terms.headline',
33 defaultMessage: '!!!No strings attached',
34 },
35 noCreditCard: {
36 id: 'pricing.trial.terms.noCreditCard',
37 defaultMessage: '!!!No credit card required',
38 },
39 automaticTrialEnd: {
40 id: 'pricing.trial.terms.automaticTrialEnd',
41 defaultMessage: '!!!Your free trial ends automatically after 14 days',
42 },
29}); 43});
30 44
31@inject('stores', 'actions') @observer 45@inject('stores', 'actions') @observer
32class ActivateTrialButton extends Component { 46class ActivateTrialButton extends Component {
33 static propTypes = { 47 static propTypes = {
34 // eslint-disable-next-line
35 classes: PropTypes.object.isRequired,
36 className: PropTypes.string, 48 className: PropTypes.string,
37 short: PropTypes.bool, 49 short: PropTypes.bool,
38 gaEventInfo: PropTypes.shape({ 50 gaEventInfo: PropTypes.shape({
@@ -55,19 +67,19 @@ class ActivateTrialButton extends Component {
55 handleCTAClick() { 67 handleCTAClick() {
56 const { actions, stores, gaEventInfo } = this.props; 68 const { actions, stores, gaEventInfo } = this.props;
57 const { hadSubscription } = stores.user.data; 69 const { hadSubscription } = stores.user.data;
58 const { defaultTrialPlan } = stores.features.features; 70 // const { defaultTrialPlan } = stores.features.features;
59 71
60 let label = ''; 72 let label = '';
61 if (!hadSubscription) { 73 if (!hadSubscription) {
62 actions.user.activateTrial({ planId: defaultTrialPlan }); 74 // actions.user.activateTrial({ planId: defaultTrialPlan });
63 75
64 label = 'Start Trial'; 76 label = 'Start Trial';
65 } else { 77 } else {
66 actions.ui.openSettings({ path: 'user' });
67
68 label = 'Upgrade Account'; 78 label = 'Upgrade Account';
69 } 79 }
70 80
81 actions.ui.openSettings({ path: 'user' });
82
71 if (gaEventInfo) { 83 if (gaEventInfo) {
72 const { category, event } = gaEventInfo; 84 const { category, event } = gaEventInfo;
73 gaEvent(category, event, label); 85 gaEvent(category, event, label);