This repository was archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
53 lines (48 loc) · 1.84 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import './src/lib/dates';
import './src/lib/logger';
import './src/lib/log.box';
import './src/lib/analytics/start.up';
import * as React from 'react';
import { StatusBar } from 'react-native';
import { default as CodePush } from 'react-native-code-push';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import * as Sentry from '@sentry/react-native';
import { ApolloProvider } from '@apollo/client';
import { PortalHost, PortalProvider } from '@gorhom/portal';
import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { AppNavigator } from '@app/navigation';
import { APP_PORTAL_HOST } from '@app/lib/portal';
import { AppServerApolloClient } from '@app/apollo/app.server';
import { ForceUpdateShield } from '@app/components/force.update';
import { PushNotificationSheet } from '@app/components/sheet.push.notification';
const queryClient = new QueryClient();
function App() {
return (
<SafeAreaProvider>
<StatusBar hidden />
<ApolloProvider client={AppServerApolloClient}>
<QueryClientProvider client={queryClient}>
<React.Suspense>
<ForceUpdateShield />
<PortalProvider>
<PortalHost name={APP_PORTAL_HOST} />
<GestureHandlerRootView style={{ flex: 1 }}>
<BottomSheetModalProvider>
<AppNavigator />
<PushNotificationSheet />
</BottomSheetModalProvider>
</GestureHandlerRootView>
</PortalProvider>
</React.Suspense>
</QueryClientProvider>
</ApolloProvider>
</SafeAreaProvider>
);
}
export default Sentry.wrap(
CodePush({
checkFrequency: CodePush.CheckFrequency.MANUAL,
})(App),
);