-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
41 lines (37 loc) · 998 Bytes
/
Copy pathApp.js
File metadata and controls
41 lines (37 loc) · 998 Bytes
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
import React from "react";
import * as firebase from 'firebase/app';
import {Provider} from 'react-redux';
import {ActionSheetProvider} from '@expo/react-native-action-sheet';
import firebaseConfig from './config/firebaseConfig'
import { YellowBox } from 'react-native';
import _ from 'lodash';
import store from './redux/store';
import BookWorm from './BookWorm';
// Turns off annoying warning
YellowBox.ignoreWarnings(['Setting a timer']);
const _console = _.clone(console);
console.warn = message => {
if (message.indexOf('Setting a timer') <= -1) {
_console.warn(message);
}
};
class App extends React.Component{
componentDidMount() {
if (!firebase.apps.length) {
this.initializeFirebase();
}
}
initializeFirebase = () => {
firebase.initializeApp(firebaseConfig);
}
render() {
return (
<Provider store={store}>
<ActionSheetProvider>
<BookWorm />
</ActionSheetProvider>
</Provider>
)
}
}
export default App;