This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {StyleSheet, Platform, Image, Text, View} from 'react-native'; | |
import firebase from 'react-native-firebase'; | |
export default class Home extends React.Component { | |
state = {currentUser: null}; | |
componentDidMount() { | |
const {currentUser} = firebase.auth(); | |
this.setState({currentUser}); | |
} | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
TextInput, | |
View, | |
Button, | |
ToastAndroid, | |
} from 'react-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {View, Text, ActivityIndicator, StyleSheet} from 'react-native'; | |
import firebase from 'react-native-firebase'; | |
export default class SplashPage extends React.Component { | |
componentDidMount() { | |
setTimeout(() => { | |
firebase.auth().onAuthStateChanged(user => { | |
this.props.navigation.navigate(user ? 'Home' : 'SignUp'); | |
}); | |
}, 1800); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {createStackNavigator} from 'react-navigation-stack'; | |
import {createAppContainer} from 'react-navigation'; | |
import SplashPage from './src/containers/SplashPage'; | |
import SignUp from './src/containers/Signup'; | |
import Login from './src/containers/Login'; | |
import Home from './src/containers/Home'; | |
const App = createStackNavigator( | |
{ | |
SplashPage: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {StyleSheet, Platform, Image, Text, View} from 'react-native'; | |
export default class Home extends React.Component { | |
state = {currentUser: null}; | |
render() { | |
const {currentUser} = this.state; | |
return ( | |
<View style={styles.container}> | |
<Text style={{fontSize: 25}}>Hi </Text> | |
<Text style={{color: 'blue', fontSize: 25}}> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
TextInput, | |
View, | |
Button, | |
ToastAndroid, | |
} from 'react-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { | |
StyleSheet, | |
Text, | |
TextInput, | |
View, | |
Button, | |
TouchableOpacity, | |
ToastAndroid, | |
} from 'react-native'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import {View, Text, ActivityIndicator, StyleSheet} from 'react-native'; | |
export default class SplashPage extends React.Component { | |
render() { | |
return ( | |
<View style={styles.container}> | |
<Text style={{color: 'blue', fontSize: 40}}>Learn Firebase</Text> | |
<ActivityIndicator color="blue" size="large" /> | |
</View> | |
); |
NewerOlder