Skip to content

Commit

Permalink
integrate login and logout function
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuan Zhu authored and Xuan Zhu committed Dec 3, 2017
1 parent 5c44d0b commit eaa3b8d
Show file tree
Hide file tree
Showing 2 changed files with 382 additions and 109 deletions.
72 changes: 72 additions & 0 deletions App-login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/

import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
View
} from 'react-native';
import firebase from 'firebase';

import { Login } from './Login';
import { Signup } from './Signup';
import { Routes } from './Routes';


/*
var config = {
apiKey: "AIzaSyBPgko3WSh-2rgjK1a7kSz9w8kClYwVvgo",
authDomain: "mijmffl.firebaseapp.com",
databaseURL: "https://mijmffl.firebaseio.com",
projectId: "mijmffl",
storageBucket: "mijmffl.appspot.com",
messagingSenderId: "485467070702"
};
if(!firebase.apps.length) {
const app = firebase.initializeApp(config);
}
*/

var config = {
apiKey: "AIzaSyA7jvpayAPe8W7mnUSY2utM9puTkScziZc",
authDomain: "mijmfsl.firebaseapp.com",
databaseURL: "https://mijmfsl.firebaseio.com",
projectId: "mijmfsl",
storageBucket: "",
messagingSenderId: "57827792969"
};
if(!firebase.apps.length) {
const app = firebase.initializeApp(config);
}

export default class App extends Component<{}> {

componentWillUnmount() {
firebase.off();
}

render() {
return (
<Routes />
);
}

}


const styles = StyleSheet.create({
container: {
height: '100%',
width: '100%',
},
callout: {
height: 20,
width: 20,
backgroundColor: 'white',
}
});
Loading

0 comments on commit eaa3b8d

Please sign in to comment.