Skip to content

Commit

Permalink
hide SplashScreen from Launch (#3743)
Browse files Browse the repository at this point in the history
  • Loading branch information
aksonov committed Jul 29, 2019
1 parent 6a1442d commit 1b1d858
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
26 changes: 18 additions & 8 deletions src/components/Launch.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import React from 'react'
import React, {useEffect} from 'react'
import {View, Image, StyleSheet} from 'react-native'
import {width, height} from './Global'
import SplashScreen from 'react-native-splash-screen'

export default props => (
<View style={[styles.container, {flex: 1, backgroundColor: 'transparent'}]} testID="screenLaunch">
<View style={styles.container}>
<Image style={{width, height}} source={require('../../images/Launch.gif')} />
export default props => {
useEffect(() => {
SplashScreen.hide()
}, [])

return (
<View
style={[styles.container, {flex: 1, backgroundColor: 'transparent'}]}
testID="screenLaunch"
>
<View style={styles.container}>
<Image style={{width, height}} source={require('../../images/Launch.gif')} />
</View>
{props.children}
</View>
{props.children}
</View>
)
)
}

const styles = StyleSheet.create({
container: {
Expand Down
1 change: 0 additions & 1 deletion src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class TinyRobotRouter extends React.Component<Props> {
{delay: 1000}
)

SplashScreen.hide()
}

render() {
Expand Down

0 comments on commit 1b1d858

Please sign in to comment.