This repository was archived by the owner on Apr 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
82 lines (71 loc) · 2.76 KB
/
App.js
File metadata and controls
82 lines (71 loc) · 2.76 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
/* eslint-disable camelcase */
import {
SpaceGrotesk_300Light,
SpaceGrotesk_400Regular,
SpaceGrotesk_500Medium,
SpaceGrotesk_600SemiBold,
SpaceGrotesk_700Bold,
useFonts
} from '@expo-google-fonts/space-grotesk';
import * as Sentry from '@sentry/react-native';
import { ActionSheetProvider, connectActionSheet } from '@expo/react-native-action-sheet';
import { StatusBar } from 'react-native';
import Navigation from './src/navigation/Navigation';
import UserProvider from './src/states/UserContextProvider';
import GeolocationProvider from './src/states/GeolocationContextProvider';
import BackgroundGolocationContextProvider from './src/states/BackgroundGolocationContextProvider';
import NotificationProvider from './src/states/NotificationProvider';
import OverlayContextProvider from './src/states/OverlayContextProvider';
import SocketContextProvider from './src/states/SocketContextProvider';
import ConversationsContextProvider from './src/states/ConversationsContextProvider';
import DropiesAroundContextProvider from './src/states/DropiesAroundContextProvider';
import { Colors } from './src/styles/Styles';
Sentry.init({
dsn: 'https://19407e7c32a2487689649a399a55c564@o1315355.ingest.sentry.io/6567185',
environment: __DEV__ ? 'dev' : 'production',
// Set tracesSampleRate to 1.0 to capture 100% of transactions for performance monitoring.
// We recommend adjusting this value in production.
// eslint-disable-next-line no-undef
tracesSampleRate: __DEV__ ? 1.0 : 0.5,
});
const NavigationApp = () => (
<NavigationContainer>
<StatusBar barStyle='light-content' backgroundColor={Colors.purple3} />
<OverlayContextProvider>
<UserProvider>
<BackgroundGolocationContextProvider>
<GeolocationProvider>
<SocketContextProvider>
<DropiesAroundContextProvider>
<ConversationsContextProvider>
<NotificationProvider>
<Navigation />
</NotificationProvider>
</ConversationsContextProvider>
</DropiesAroundContextProvider>
</SocketContextProvider>
</GeolocationProvider>
</BackgroundGolocationContextProvider>
</UserProvider>
</OverlayContextProvider>
</NavigationContainer>
);
const ConnectedNavigationApp = connectActionSheet(NavigationApp);
export default function App() {
const [fontsLoaded] = useFonts({
SpaceGrotesk_300Light,
SpaceGrotesk_400Regular,
SpaceGrotesk_500Medium,
SpaceGrotesk_600SemiBold,
SpaceGrotesk_700Bold,
});
if (!fontsLoaded)
return null;
return (
<ActionSheetProvider>
<ConnectedNavigationApp />
</ActionSheetProvider>
);
}