-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
42 lines (36 loc) · 1.02 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
import React, { useEffect } from 'react';
import Toast from 'react-native-toast-message';
import SplashScreen from 'react-native-splash-screen';
import { NavigationContainer } from '@react-navigation/native';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import analytics from '@react-native-firebase/analytics';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import AppInner from './AppInner';
import { linking } from '@config/deepLinkConfig';
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5000,
},
},
});
function App(): React.JSX.Element {
useEffect(() => {
SplashScreen.hide();
}, []);
return (
<SafeAreaProvider>
<NavigationContainer
onStateChange={() => {
Toast.hide();
}}
linking={linking}
>
<QueryClientProvider client={queryClient}>
<AppInner />
</QueryClientProvider>
</NavigationContainer>
</SafeAreaProvider>
);
}
export default App;