Skip to content

Commit

Permalink
fix(rn): update state when startup animation finish
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Feb 21, 2019
1 parent a52a7be commit d92adb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/react-native/common/components/App.js
Expand Up @@ -137,7 +137,7 @@ export default class App extends PureComponent {
backgroundColor: colors.white,
}}
>
<Animation />
<Animation onFinish={() => this.setState({ showAnim: false })} />
</Flex.Rows>
) : null}
{!loading ? (
Expand Down
4 changes: 2 additions & 2 deletions client/react-native/common/components/Library/Animation.js
@@ -1,12 +1,12 @@
import React from 'react'
import LottieView from 'lottie-react-native'

export default () => (
export default ({ onFinish }) => (
<LottieView
source={require('../../static/animation/BertyAnimation.json')}
autoPlay
loop={false}
onAnimationFinish={() => this.setState({ showAnim: false })}
onAnimationFinish={onFinish}
style={{ width: 320 }}
autoSize
/>
Expand Down

0 comments on commit d92adb5

Please sign in to comment.