diff options
author | 2019-10-20 13:53:05 +0200 | |
---|---|---|
committer | 2019-10-20 13:53:05 +0200 | |
commit | f468e55f5dc3c08b48e4526e0fc7b5040b07ca44 (patch) | |
tree | ac602b8a3e1bc9b0f41840d56c8b9565c063f50d /src/features/trialStatusBar/containers/TrialStatusBarScreen.js | |
parent | Fix name in pricing screen (diff) | |
download | ferdium-app-f468e55f5dc3c08b48e4526e0fc7b5040b07ca44.tar.gz ferdium-app-f468e55f5dc3c08b48e4526e0fc7b5040b07ca44.tar.zst ferdium-app-f468e55f5dc3c08b48e4526e0fc7b5040b07ca44.zip |
Fix hard coded plan name
Diffstat (limited to 'src/features/trialStatusBar/containers/TrialStatusBarScreen.js')
-rw-r--r-- | src/features/trialStatusBar/containers/TrialStatusBarScreen.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js index 15201496b..35b70a5bc 100644 --- a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js +++ b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js | |||
@@ -2,15 +2,21 @@ import React, { Component } from 'react'; | |||
2 | import { observer, inject } from 'mobx-react'; | 2 | import { observer, inject } from 'mobx-react'; |
3 | import PropTypes from 'prop-types'; | 3 | import PropTypes from 'prop-types'; |
4 | import ms from 'ms'; | 4 | import ms from 'ms'; |
5 | import { intlShape } from 'react-intl'; | ||
5 | 6 | ||
6 | import FeaturesStore from '../../../stores/FeaturesStore'; | 7 | import FeaturesStore from '../../../stores/FeaturesStore'; |
7 | import UserStore from '../../../stores/UserStore'; | 8 | import UserStore from '../../../stores/UserStore'; |
8 | import TrialStatusBar from '../components/TrialStatusBar'; | 9 | import TrialStatusBar from '../components/TrialStatusBar'; |
9 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; | 10 | import ErrorBoundary from '../../../components/util/ErrorBoundary'; |
10 | import { trialStatusBarStore } from '..'; | 11 | import { trialStatusBarStore } from '..'; |
12 | import { i18nPlanName } from '../../../helpers/plan-helpers'; | ||
11 | 13 | ||
12 | @inject('stores', 'actions') @observer | 14 | @inject('stores', 'actions') @observer |
13 | class TrialStatusBarScreen extends Component { | 15 | class TrialStatusBarScreen extends Component { |
16 | static contextTypes = { | ||
17 | intl: intlShape, | ||
18 | }; | ||
19 | |||
14 | state = { | 20 | state = { |
15 | showOverlay: true, | 21 | showOverlay: true, |
16 | percent: 0, | 22 | percent: 0, |
@@ -53,6 +59,8 @@ class TrialStatusBarScreen extends Component { | |||
53 | 59 | ||
54 | 60 | ||
55 | render() { | 61 | render() { |
62 | const { intl } = this.context; | ||
63 | |||
56 | const { | 64 | const { |
57 | showOverlay, | 65 | showOverlay, |
58 | percent, | 66 | percent, |
@@ -67,10 +75,12 @@ class TrialStatusBarScreen extends Component { | |||
67 | const { user } = this.props.stores; | 75 | const { user } = this.props.stores; |
68 | const { upgradeAccount } = this.props.actions.payment; | 76 | const { upgradeAccount } = this.props.actions.payment; |
69 | 77 | ||
78 | const planName = i18nPlanName(user.team.plan, intl); | ||
79 | |||
70 | return ( | 80 | return ( |
71 | <ErrorBoundary> | 81 | <ErrorBoundary> |
72 | <TrialStatusBar | 82 | <TrialStatusBar |
73 | planName="Professional" | 83 | planName={planName} |
74 | percent={percent < 5 ? 5 : percent} | 84 | percent={percent < 5 ? 5 : percent} |
75 | trialEnd={restTime} | 85 | trialEnd={restTime} |
76 | upgradeAccount={() => upgradeAccount({ | 86 | upgradeAccount={() => upgradeAccount({ |