-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
58 lines (44 loc) · 1.43 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import React from 'react';
import {createStore, combineReducers} from "redux";
import {Provider} from 'react-redux';
import ReduxThunk from 'redux-thunk';
import ApiKeys from "./src/constants/ApiKeys";
import selfieReducer from "./src/store/reducers/selfie";
import sleepReducer from "./src/store/reducers/sleep";
import AppNavigator from './src/navigation/faces.navigation'
import MainNavigator from './src/navigation/faces.navigation';
import * as firebase from "firebase";
// import {init} from './src/helpers/db';
// init();
//
// init().then(() => {
// console.log('Initialized Database');
// }).catch((err) => {
// console.log("Initializing Database Failed");
// console.log(err)
// });
const rootReducer = combineReducers({
sleep: sleepReducer,
selfie: selfieReducer,
});
const store = createStore(rootReducer);
const fetchFonts = () => {
return Font.loadAsync({
'open-sans': require('./assets/open-sans/OpenSans-Regular.ttf'),
'open-sans-bold': require('./assets/open-sans/OpenSans-Bold.ttf')
});
};
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = {
};
// initializing firebase ..
if (!firebase.apps.length) {firebase.initializeApp(ApiKeys.FirebaseConfig);}
}
render() {
return (
<Provider store={store}><AppNavigator/></Provider>
);
};
};