-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
37 lines (34 loc) · 1.78 KB
/
App.tsx
File metadata and controls
37 lines (34 loc) · 1.78 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
import React, { Suspense } from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import GitLoginScreen from './src/screens/GitLoginScreen';
import GitWebViewScreen from './src/screens/GitWebViewScreen';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { RootStackParamList } from './type';
import TabNavigator from './src/components/navigation/TabNavigator';
import { Linking } from './src/config/linkingConfig';
import IntroScreen from './src/screens/IntroScreen';
import LoadingScreen from './src/components/common/LoadingScreen';
import { ErrorBoundary } from 'react-error-boundary';
import FallbackComponent from './src/components/common/FallbackComponent';
const Stack = createStackNavigator<RootStackParamList>();
const queryClient = new QueryClient();
const App = () => {
return (
<QueryClientProvider client={queryClient}>
<ErrorBoundary FallbackComponent={FallbackComponent}>
<Suspense fallback={<LoadingScreen />}>
<NavigationContainer linking={Linking}>
<Stack.Navigator initialRouteName="IntroScreen" screenOptions={{ headerShown: false }}>
<Stack.Screen name="IntroScreen" component={IntroScreen} />
<Stack.Screen name="GitLoginScreen" component={GitLoginScreen} />
<Stack.Screen name="Main" component={TabNavigator} />
<Stack.Screen name="GitWebViewScreen" component={GitWebViewScreen} />
</Stack.Navigator>
</NavigationContainer>
</Suspense>
</ErrorBoundary>
</QueryClientProvider>
);
};
export default App;