diff options
author | 2019-09-07 00:05:46 +0200 | |
---|---|---|
committer | 2019-09-07 00:05:46 +0200 | |
commit | 31d2d5a11cbf9f6fd41bff273aad1d23e014caa8 (patch) | |
tree | a185ed33e104844737a2a22015110463254b6583 /src/components/ui/ActivateTrialButton/index.js | |
parent | Update CHANGELOG.md (diff) | |
download | ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.tar.gz ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.tar.zst ferdium-app-31d2d5a11cbf9f6fd41bff273aad1d23e014caa8.zip |
Make trial activation more obvious
Diffstat (limited to 'src/components/ui/ActivateTrialButton/index.js')
-rw-r--r-- | src/components/ui/ActivateTrialButton/index.js | 24 |
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'; | |||
5 | import classnames from 'classnames'; | 5 | import classnames from 'classnames'; |
6 | 6 | ||
7 | import { Button } from '@meetfranz/forms'; | 7 | import { Button } from '@meetfranz/forms'; |
8 | import { H2 } from '@meetfranz/ui'; | ||
8 | import { gaEvent } from '../../../lib/analytics'; | 9 | import { gaEvent } from '../../../lib/analytics'; |
9 | 10 | ||
10 | import UserStore from '../../../stores/UserStore'; | 11 | import UserStore from '../../../stores/UserStore'; |
12 | import FeatureItem from '../FeatureItem'; | ||
11 | 13 | ||
12 | const messages = defineMessages({ | 14 | const 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 |
32 | class ActivateTrialButton extends Component { | 46 | class 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); |