-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplash.js
More file actions
72 lines (50 loc) · 2 KB
/
splash.js
File metadata and controls
72 lines (50 loc) · 2 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import React from 'react';
import { StyleSheet, Platform, Image, Text, View, ScrollView, AsyncStorage, ImageBackground } from 'react-native';
import firebase from 'react-native-firebase';
export default class splash extends React.Component {
static navigationOptions = {
header: null,
};
constructor() {
super();
this.state = {
// firebase things?
timePassed: false,
};
}
componentDidMount() {
const launched = AsyncStorage.getItem("launched")
.then(value => {
if (value == null) {
setTimeout(() => {
this.props.navigation.navigate("verify")
//Put All Your Code Here, Which You Want To Execute After Some Delay Time.
}, 2000);
}
else {
setTimeout(() => {
this.props.navigation.navigate("webview")
//Put All Your Code Here, Which You Want To Execute After Some Delay Time.
}, 2000);
}
})
}
render() {
return (
<View style={styles.container}>
<ImageBackground source={require("C:/Users/asan/Desktop/RNFirebase/tedarik/react-native-firebase-starter/src/img/splash.jpg")} style={{width:'100%',height:'80%'}}>
<Text style={{ fontSize: 32, fontWeight: 'bold', textAlign: 'center', alignSelf: 'center', color:'white' }}> YÜKLENİYOR</Text>
<Text style={{ fontSize: 44, fontWeight: 'bold', textAlign: 'center', alignSelf: 'center', color:'white' }}> . . .</Text>
</ImageBackground>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#753A8A',
}
});