-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathApp.js
44 lines (35 loc) · 1.02 KB
/
App.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 React, {Component} from 'react';
import * as firebase from 'firebase';
import {AppLoading, Font} from 'expo';
import {LoginNav} from './Router';
import Login from './Login';
import {Root} from "native-base"; // allows for toasts
const firebaseConfig = {
apiKey: "AIzaSyCEbdjQNZ9IpoOmc5gWAVI4Doq224_JWUg",
authDomain: "princetonevents-3aeed.firebaseapp.com",
databaseURL: "https://princetonevents-3aeed.firebaseio.com",
storageBucket: "princetonevents-3aeed.appspot.com"
};
export const firebaseApp = firebase.initializeApp(firebaseConfig);
class App extends Component {
state = {
loaded: false
}
componentWillMount() {
this._loadFontsAsync();
}
_loadFontsAsync = async() => {
await Font.loadAsync({'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf')});
this.setState({loaded: true});
}
render() {
if (!this.state.loaded) {
return <AppLoading/>
}
return (
<LoginNav/>
);
}
}
export default App;