-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathApp.js
More file actions
48 lines (44 loc) · 1.4 KB
/
Copy pathApp.js
File metadata and controls
48 lines (44 loc) · 1.4 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
import React from 'react';
import { StyleSheet, View, Platform, StatusBar } from 'react-native';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
import reducers from './src/reducers';
import firebase from 'firebase';
import { AppNavigation } from './src/navigation/AppNavigation';
import {THEME_COLOR} from "./src/lib/Constants";
export default class App extends React.Component {
componentWillMount() {
// Initialize Firebase
const config = {
apiKey: "<INSERT YOUR INFO HERE>",
authDomain: "<INSERT YOUR INFO HERE>",
databaseURL: "<INSERT YOUR INFO HERE>",
projectId: "<INSERT YOUR INFO HERE>",
storageBucket: "<INSERT YOUR INFO HERE>",
messagingSenderId: "<INSERT YOUR INFO HERE>"
};
firebase.initializeApp(config);
}
render() {
const store = createStore(reducers, {}, applyMiddleware(ReduxThunk));
return (
<Provider store={store}>
<View style={styles.container}>
{Platform.OS === 'ios' && <StatusBar barStyle='light-content'/>}
{Platform.OS === 'android' && <View style={styles.statusBarUnderlay} />}
<AppNavigation />
</View>
</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1
},
statusBarUnderlay: {
height: 24,
backgroundColor: THEME_COLOR
},
});