-
Notifications
You must be signed in to change notification settings - Fork 0
/
LaunchScreen.js
57 lines (51 loc) · 1.43 KB
/
LaunchScreen.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
49
50
51
52
53
54
55
56
57
import React, { Component } from "react";
import {
ScrollView,
Text,
Image,
View,
TouchableOpacity,
Button
} from "react-native";
import firebase from "react-native-firebase";
import { Images } from "./Themes";
import Login from "./Login";
import SignUp from "./SignUp";
// Styles
import styles from "./Styles/LaunchScreenStyles";
//import { Button } from "../../../AppData/Local/Microsoft/TypeScript/2.6/node_modules/@types/react-native";
export default class LaunchScreen extends Component {
componentDidMount() {
firebase.auth().onAuthStateChanged(user => {
this.props.navigation.navigate(user ? "Main" : "LaunchScreen");
});
}
render() {
return (
<View style={styles.mainContainer}>
<Image
source={Images.background}
style={styles.backgroundImage}
resizeMode="stretch"
/>
<ScrollView>
<View style={styles.centered}>
<Image source={Images.launch} style={styles.logo} />
</View>
<View style={styles.section} />
<Button
// style={styles.buttonContainer}
title="Login"
onPress={() => this.props.navigation.navigate("Login")}
/>
<Text />
<Button
// style={styles.buttonContainer}
title="Signup"
onPress={() => this.props.navigation.navigate("SignUp")}
/>
</ScrollView>
</View>
);
}
}