-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplash.js
48 lines (41 loc) · 984 Bytes
/
Splash.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import { StatusBar } from 'expo-status-bar';
import React, { Component } from 'react';
import {
View,StyleSheet,Image
} from 'react-native';
class Splash extends Component {
constructor(props){
super(props);
this.state = {
};
const {navigation} = this.props;
this.navigation = navigation;
}
componentDidMount() {
setTimeout(()=>{
this.props.navigation.navigate('Login');
this.navigation.reset({index:0,routes:[{name:'Login'}]});
},2000)
}
render(props) {
return (
<View style={styles.container}>
<Image source={require('./logo2.png')} style={styles.logo} />
<StatusBar style='light' />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#6e7d75',
alignItems: 'center',
justifyContent: 'center',
},
logo: {
height: 132,
width: 150
}
});
export default Splash;