-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
34 lines (30 loc) · 972 Bytes
/
App.tsx
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
import 'react-native-gesture-handler';
import React from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { NavigationContainer } from '@react-navigation/native';
import { MainRoutes } from './routes';
import * as Sentry from '@sentry/react-native';
import Config from 'react-native-config';
import configureAppStore from './store';
import { IS_PRODUCTION } from './actions/types';
import './i18n';
const SENTRY_DSN = Config.SENTRY_DSN;
const { store, persistor } = configureAppStore();
const App = () => {
if (IS_PRODUCTION) {
Sentry.init({
dsn: SENTRY_DSN
});
}
return (
<NavigationContainer>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<MainRoutes />
</PersistGate>
</Provider>
</NavigationContainer>
);
};
export default App;