-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
41 lines (37 loc) · 1.17 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
import React, { Component } from "react";
import { StatusBar, View, Platform } from "react-native";
import firebase from "firebase";
import RootNavigator from "./src/config/routes";
import Orientation from "react-native-orientation-locker";
import EStyleSheet from "react-native-extended-stylesheet";
import OneSignal from "react-native-onesignal";
import { Provider } from "react-redux";
import { store, persistor } from "./src/store";
import { PersistGate } from "redux-persist/lib/integration/react";
import config from "./config"; // gitignored
EStyleSheet.build({
$primaryColor: "#4534fe",
});
const prefix = Platform.OS == "android" ? "liwc://liwc/" : "liwc://";
export default class App extends Component {
constructor(props) {
super(props);
}
componentWillMount() {
Orientation.lockToPortrait();
OneSignal.init(config.oneSignalKey);
// OneSignal.configure();
}
render() {
return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<View style={{ flex: 1 }}>
<StatusBar backgroundColor="black" barStyle="light-content" />
<RootNavigator uriPrefix={prefix} />
</View>
</PersistGate>
</Provider>
);
}
}