diff options
author | 2019-02-25 16:58:42 +0100 | |
---|---|---|
committer | 2019-02-25 16:58:42 +0100 | |
commit | b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4 (patch) | |
tree | 6b6701cb37e024648b41cc9a6c4174eda35487f9 /src/components/services/content/WebviewCrashHandler.js | |
parent | remove ping (diff) | |
download | ferdium-app-b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4.tar.gz ferdium-app-b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4.tar.zst ferdium-app-b55ee4d97493f66584f2da0b2f5bb43dcfe25fc4.zip |
replace ms time strings with ms module
Diffstat (limited to 'src/components/services/content/WebviewCrashHandler.js')
-rw-r--r-- | src/components/services/content/WebviewCrashHandler.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/components/services/content/WebviewCrashHandler.js b/src/components/services/content/WebviewCrashHandler.js index 42bc3c877..7a69dba87 100644 --- a/src/components/services/content/WebviewCrashHandler.js +++ b/src/components/services/content/WebviewCrashHandler.js | |||
@@ -2,6 +2,7 @@ import React, { Component } from 'react'; | |||
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import { defineMessages, intlShape } from 'react-intl'; | 4 | import { defineMessages, intlShape } from 'react-intl'; |
5 | import ms from 'ms'; | ||
5 | 6 | ||
6 | import Button from '../../ui/Button'; | 7 | import Button from '../../ui/Button'; |
7 | 8 | ||
@@ -35,12 +36,12 @@ export default @observer class WebviewCrashHandler extends Component { | |||
35 | }; | 36 | }; |
36 | 37 | ||
37 | state = { | 38 | state = { |
38 | countdown: 10000, | 39 | countdown: ms('10s'), |
39 | } | 40 | } |
40 | 41 | ||
41 | countdownInterval = null; | 42 | countdownInterval = null; |
42 | 43 | ||
43 | countdownIntervalTimeout = 1000; | 44 | countdownIntervalTimeout = ms('1s'); |
44 | 45 | ||
45 | 46 | ||
46 | componentDidMount() { | 47 | componentDidMount() { |
@@ -75,7 +76,7 @@ export default @observer class WebviewCrashHandler extends Component { | |||
75 | <p className="footnote"> | 76 | <p className="footnote"> |
76 | {intl.formatMessage(messages.autoReload, { | 77 | {intl.formatMessage(messages.autoReload, { |
77 | name, | 78 | name, |
78 | seconds: this.state.countdown / 1000, | 79 | seconds: this.state.countdown / ms('1s'), |
79 | })} | 80 | })} |
80 | </p> | 81 | </p> |
81 | </div> | 82 | </div> |