diff options
author | 2018-11-25 20:48:40 +0100 | |
---|---|---|
committer | 2018-11-25 20:48:40 +0100 | |
commit | f1d7f88ff0651656ea5ed22737abecede4bac876 (patch) | |
tree | f75f14e708ab271b116a58fdedb78e68e69f488f /src/features/delayApp | |
parent | Add missing delayApp commit (diff) | |
download | ferdium-app-f1d7f88ff0651656ea5ed22737abecede4bac876.tar.gz ferdium-app-f1d7f88ff0651656ea5ed22737abecede4bac876.tar.zst ferdium-app-f1d7f88ff0651656ea5ed22737abecede4bac876.zip |
Fix delayApp issues
Diffstat (limited to 'src/features/delayApp')
-rw-r--r-- | src/features/delayApp/Component.js | 8 | ||||
-rw-r--r-- | src/features/delayApp/index.js | 2 | ||||
-rw-r--r-- | src/features/delayApp/styles.js | 49 |
3 files changed, 29 insertions, 30 deletions
diff --git a/src/features/delayApp/Component.js b/src/features/delayApp/Component.js index 2bfa1162e..403340c7b 100644 --- a/src/features/delayApp/Component.js +++ b/src/features/delayApp/Component.js | |||
@@ -24,7 +24,7 @@ const messages = defineMessages({ | |||
24 | }, | 24 | }, |
25 | }); | 25 | }); |
26 | 26 | ||
27 | export default @inject('actions') @observer @injectSheet(styles) class DelayApp extends Component { | 27 | export default @inject('actions') @injectSheet(styles) @observer class DelayApp extends Component { |
28 | static propTypes = { | 28 | static propTypes = { |
29 | // eslint-disable-next-line | 29 | // eslint-disable-next-line |
30 | classes: PropTypes.object.isRequired, | 30 | classes: PropTypes.object.isRequired, |
@@ -39,8 +39,6 @@ export default @inject('actions') @observer @injectSheet(styles) class DelayApp | |||
39 | } | 39 | } |
40 | 40 | ||
41 | componentDidMount() { | 41 | componentDidMount() { |
42 | // const { reload } = this.props; | ||
43 | |||
44 | this.countdownInterval = setInterval(() => { | 42 | this.countdownInterval = setInterval(() => { |
45 | this.setState({ | 43 | this.setState({ |
46 | countdown: this.state.countdown - this.countdownIntervalTimeout, | 44 | countdown: this.state.countdown - this.countdownIntervalTimeout, |
@@ -53,6 +51,10 @@ export default @inject('actions') @observer @injectSheet(styles) class DelayApp | |||
53 | }, this.countdownIntervalTimeout); | 51 | }, this.countdownIntervalTimeout); |
54 | } | 52 | } |
55 | 53 | ||
54 | componentWillUnmount() { | ||
55 | clearInterval(this.countdownInterval); | ||
56 | } | ||
57 | |||
56 | countdownInterval = null; | 58 | countdownInterval = null; |
57 | countdownIntervalTimeout = 1000; | 59 | countdownIntervalTimeout = 1000; |
58 | 60 | ||
diff --git a/src/features/delayApp/index.js b/src/features/delayApp/index.js index a3cce03ee..910b54959 100644 --- a/src/features/delayApp/index.js +++ b/src/features/delayApp/index.js | |||
@@ -63,5 +63,5 @@ export default function init(stores) { | |||
63 | ); | 63 | ); |
64 | } | 64 | } |
65 | 65 | ||
66 | export const component = DelayAppComponent; | 66 | export const Component = DelayAppComponent; |
67 | 67 | ||
diff --git a/src/features/delayApp/styles.js b/src/features/delayApp/styles.js index 097368d9a..5c214cfdf 100644 --- a/src/features/delayApp/styles.js +++ b/src/features/delayApp/styles.js | |||
@@ -1,26 +1,23 @@ | |||
1 | export default (theme) => { | 1 | export default theme => ({ |
2 | console.log(theme); | 2 | container: { |
3 | return ({ | 3 | background: theme.colorBackground, |
4 | container: { | 4 | position: 'absolute', |
5 | background: theme.colorBackground, | 5 | top: 0, |
6 | position: 'absolute', | 6 | width: '100%', |
7 | top: 0, | 7 | display: 'flex', |
8 | width: '100%', | 8 | 'flex-direction': 'column', |
9 | display: 'flex', | 9 | 'align-items': 'center', |
10 | 'flex-direction': 'column', | 10 | 'justify-content': 'center', |
11 | 'align-items': 'center', | 11 | 'z-index': 150, |
12 | 'justify-content': 'center', | 12 | }, |
13 | 'z-index': 150, | 13 | headline: { |
14 | }, | 14 | color: theme.colorHeadline, |
15 | headline: { | 15 | margin: [25, 0, 40], |
16 | color: theme.colorHeadline, | 16 | 'max-width': 500, |
17 | margin: [25, 0, 40], | 17 | 'text-align': 'center', |
18 | 'max-width': 500, | 18 | 'line-height': '1.3em', |
19 | 'text-align': 'center', | 19 | }, |
20 | 'line-height': '1.3em', | 20 | button: { |
21 | }, | 21 | margin: [40, 0, 20], |
22 | button: { | 22 | }, |
23 | margin: [40, 0, 20], | 23 | }); |
24 | }, | ||
25 | }); | ||
26 | }; | ||