diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-07-02 19:49:55 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-03 07:19:55 +0530 |
commit | 33123c354b79f7951423dd75097b11e7eb075f99 (patch) | |
tree | 29f6e857f02d0e0fc67d89a657a54a865ed5538a /src/features/trialStatusBar | |
parent | Minor refactoring to move all runtime configs from 'config.js' into 'environm... (diff) | |
download | ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.gz ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.tar.zst ferdium-app-33123c354b79f7951423dd75097b11e7eb075f99.zip |
Upgrade various dependencies to latest part 2 (#1557)
* Upgrade various dependencies to latest, remove unnecessary electron-hunspell
- upgrade eslint and friends to latest
- remove deprecated 'node-sass' in favor of 'sass'
- disable new rules from 'eslint-config-airbnb' that are conflicting with current code style
- add workspace config for 'vscode' that silences 'experimentalDecorator' warning and forces 'prettier' to single quote
* Run yarn lint to autofix with new ruleset and worked down lint issues to zero
Diffstat (limited to 'src/features/trialStatusBar')
-rw-r--r-- | src/features/trialStatusBar/containers/TrialStatusBarScreen.js | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js index 715251854..e0f5ab5f2 100644 --- a/src/features/trialStatusBar/containers/TrialStatusBarScreen.js +++ b/src/features/trialStatusBar/containers/TrialStatusBarScreen.js | |||
@@ -12,7 +12,8 @@ import { trialStatusBarStore } from '..'; | |||
12 | import { i18nPlanName } from '../../../helpers/plan-helpers'; | 12 | import { i18nPlanName } from '../../../helpers/plan-helpers'; |
13 | import PaymentStore from '../../../stores/PaymentStore'; | 13 | import PaymentStore from '../../../stores/PaymentStore'; |
14 | 14 | ||
15 | @inject('stores', 'actions') @observer | 15 | @inject('stores', 'actions') |
16 | @observer | ||
16 | class TrialStatusBarScreen extends Component { | 17 | class TrialStatusBarScreen extends Component { |
17 | static contextTypes = { | 18 | static contextTypes = { |
18 | intl: intlShape, | 19 | intl: intlShape, |
@@ -41,7 +42,9 @@ class TrialStatusBarScreen extends Component { | |||
41 | 42 | ||
42 | calculateRestTime() { | 43 | calculateRestTime() { |
43 | const { trialEndTime } = trialStatusBarStore; | 44 | const { trialEndTime } = trialStatusBarStore; |
44 | const percent = Math.abs(100 - Math.abs(trialEndTime.asMilliseconds()) * 100 / ms('14d')).toFixed(2); | 45 | const percent = ( |
46 | Math.abs(100 - Math.abs(trialEndTime.asMilliseconds()) * 100) / ms('14d') | ||
47 | ).toFixed(2); | ||
45 | const restTime = trialEndTime.humanize(); | 48 | const restTime = trialEndTime.humanize(); |
46 | const hasEnded = trialEndTime.asMilliseconds() > 0; | 49 | const hasEnded = trialEndTime.asMilliseconds() > 0; |
47 | 50 | ||
@@ -58,18 +61,19 @@ class TrialStatusBarScreen extends Component { | |||
58 | }); | 61 | }); |
59 | } | 62 | } |
60 | 63 | ||
61 | |||
62 | render() { | 64 | render() { |
63 | const { intl } = this.context; | 65 | const { intl } = this.context; |
64 | 66 | ||
65 | const { | 67 | const { |
66 | showOverlay, | 68 | showOverlay, percent, restTime, hasEnded, |
67 | percent, | ||
68 | restTime, | ||
69 | hasEnded, | ||
70 | } = this.state; | 69 | } = this.state; |
71 | 70 | ||
72 | if (!trialStatusBarStore || !trialStatusBarStore.isFeatureActive || !showOverlay || !trialStatusBarStore.showTrialStatusBarOverlay) { | 71 | if ( |
72 | !trialStatusBarStore | ||
73 | || !trialStatusBarStore.isFeatureActive | ||
74 | || !showOverlay | ||
75 | || !trialStatusBarStore.showTrialStatusBarOverlay | ||
76 | ) { | ||
73 | return null; | 77 | return null; |
74 | } | 78 | } |
75 | 79 | ||