diff options
Diffstat (limited to 'src/components/ui/AppLoader/index.js')
-rw-r--r-- | src/components/ui/AppLoader/index.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/components/ui/AppLoader/index.js b/src/components/ui/AppLoader/index.js index 31db3d52c..1b9d044f4 100644 --- a/src/components/ui/AppLoader/index.js +++ b/src/components/ui/AppLoader/index.js | |||
@@ -28,11 +28,13 @@ export default @injectSheet(styles) class AppLoader extends Component { | |||
28 | step: 0, | 28 | step: 0, |
29 | } | 29 | } |
30 | 30 | ||
31 | interval = null; | ||
32 | |||
31 | componentDidMount() { | 33 | componentDidMount() { |
32 | this.interval = setInterval(() => { | 34 | this.interval = setInterval(() => { |
33 | this.setState({ | 35 | this.setState(prevState => ({ |
34 | step: this.state.step === textList.length - 1 ? 0 : this.state.step + 1, | 36 | step: prevState.step === textList.length - 1 ? 0 : prevState.step + 1, |
35 | }); | 37 | })); |
36 | }, 2500); | 38 | }, 2500); |
37 | } | 39 | } |
38 | 40 | ||
@@ -40,8 +42,6 @@ export default @injectSheet(styles) class AppLoader extends Component { | |||
40 | clearInterval(this.interval); | 42 | clearInterval(this.interval); |
41 | } | 43 | } |
42 | 44 | ||
43 | interval = null; | ||
44 | |||
45 | render() { | 45 | render() { |
46 | const { classes } = this.props; | 46 | const { classes } = this.props; |
47 | const { step } = this.state; | 47 | const { step } = this.state; |
@@ -66,4 +66,3 @@ export default @injectSheet(styles) class AppLoader extends Component { | |||
66 | ); | 66 | ); |
67 | } | 67 | } |
68 | } | 68 | } |
69 | |||