-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSplash.js
44 lines (37 loc) · 1.05 KB
/
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
import { StatusBar } from 'expo-status-bar';
import React, { Component } from 'react';
import { ActivityIndicator, FlatList, Text, View, StyleSheet, TouchableOpacity } from 'react-native';
import Constants from 'expo-constants';
import { MaterialCommunityIcons } from '@expo/vector-icons';
export default class Splash extends Component {
constructor(props) {
super(props);
this.state = {
};
const {navigation} = this.props;
this.navigation = navigation;
}
componentDidMount() {
setTimeout(() => {
console.log("test");
this.navigation.navigate('IdentifyMachine');
this.navigation.reset({index:0,routes:[{name:'IdentifyMachine'}]});
}, 2000)
}
render() {
return (
<View style={styles.container}>
<MaterialCommunityIcons name="cup-water" size={200} color="black" />
<StatusBar style='dark' />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
justifyContent: 'center',
alignItems: 'center'
},
});