aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-12-09 20:48:25 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-12-09 20:48:25 +0100
commit5d6164973e92fa8a3e3c18a0eb2e29494aea4f48 (patch)
tree382e6c672bbc0f7582b3b627b02111dcce902894 /src/features
parentAdd React 16 didCatch/ErrorBoundary component (diff)
downloadferdium-app-5d6164973e92fa8a3e3c18a0eb2e29494aea4f48.tar.gz
ferdium-app-5d6164973e92fa8a3e3c18a0eb2e29494aea4f48.tar.zst
ferdium-app-5d6164973e92fa8a3e3c18a0eb2e29494aea4f48.zip
Fix linting issues
Diffstat (limited to 'src/features')
-rw-r--r--src/features/delayApp/Component.js19
-rw-r--r--src/features/delayApp/index.js1
-rw-r--r--src/features/serviceProxy/index.js1
3 files changed, 11 insertions, 10 deletions
diff --git a/src/features/delayApp/Component.js b/src/features/delayApp/Component.js
index 403340c7b..5c6ceaf86 100644
--- a/src/features/delayApp/Component.js
+++ b/src/features/delayApp/Component.js
@@ -6,7 +6,7 @@ import injectSheet from 'react-jss';
6 6
7import Button from '../../components/ui/Button'; 7import Button from '../../components/ui/Button';
8 8
9import { config } from './'; 9import { config } from '.';
10import styles from './styles'; 10import styles from './styles';
11 11
12const messages = defineMessages({ 12const messages = defineMessages({
@@ -38,10 +38,14 @@ export default @inject('actions') @injectSheet(styles) @observer class DelayApp
38 countdown: config.delayDuration, 38 countdown: config.delayDuration,
39 } 39 }
40 40
41 countdownInterval = null;
42
43 countdownIntervalTimeout = 1000;
44
41 componentDidMount() { 45 componentDidMount() {
42 this.countdownInterval = setInterval(() => { 46 this.countdownInterval = setInterval(() => {
43 this.setState({ 47 this.setState({
44 countdown: this.state.countdown - this.countdownIntervalTimeout, 48 countdown: prevState => ({ value: prevState.countdown - this.countdownIntervalTimeout }),
45 }); 49 });
46 50
47 if (this.state.countdown <= 0) { 51 if (this.state.countdown <= 0) {
@@ -55,9 +59,6 @@ export default @inject('actions') @injectSheet(styles) @observer class DelayApp
55 clearInterval(this.countdownInterval); 59 clearInterval(this.countdownInterval);
56 } 60 }
57 61
58 countdownInterval = null;
59 countdownIntervalTimeout = 1000;
60
61 render() { 62 render() {
62 const { classes, actions } = this.props; 63 const { classes, actions } = this.props;
63 const { intl } = this.context; 64 const { intl } = this.context;
@@ -71,9 +72,11 @@ export default @inject('actions') @injectSheet(styles) @observer class DelayApp
71 buttonType="inverted" 72 buttonType="inverted"
72 onClick={() => actions.ui.openSettings({ path: 'user' })} 73 onClick={() => actions.ui.openSettings({ path: 'user' })}
73 /> 74 />
74 <p className="footnote">{intl.formatMessage(messages.text, { 75 <p className="footnote">
75 seconds: this.state.countdown / 1000, 76 {intl.formatMessage(messages.text, {
76 })}</p> 77 seconds: this.state.countdown / 1000,
78 })}
79 </p>
77 </div> 80 </div>
78 ); 81 );
79 } 82 }
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js
index 9ffa1d2fd..d5c544b78 100644
--- a/src/features/delayApp/index.js
+++ b/src/features/delayApp/index.js
@@ -67,4 +67,3 @@ export default function init(stores) {
67} 67}
68 68
69export const Component = DelayAppComponent; 69export const Component = DelayAppComponent;
70
diff --git a/src/features/serviceProxy/index.js b/src/features/serviceProxy/index.js
index acd8f162f..d46f9e6f1 100644
--- a/src/features/serviceProxy/index.js
+++ b/src/features/serviceProxy/index.js
@@ -45,4 +45,3 @@ export default function init(stores) {
45 }); 45 });
46 }); 46 });
47} 47}
48