-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
54 lines (52 loc) · 1.88 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
54
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { HomeScreen } from './src/modules/HomeScreen';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { AuthenticateScreen } from './src/modules/AuthenticateScreen';
import { TopNavScreen, TopRouteParams } from './src/common/navigation';
import { SplashScreen } from './src/modules/SplashScreen';
import { UserProfileProvider } from './src/components/profile-provider';
import { SendStack } from './src/modules/send/SendStack';
import { ProfileStack } from './src/modules/profile/ProfileStack';
import { StatusBar } from 'react-native';
// for using solana utils in the app
// see https://github.com/uuidjs/uuid#getrandomvalues-not-supported
import 'react-native-get-random-values';
const Stack = createNativeStackNavigator<TopRouteParams>();
export default function App(): JSX.Element {
return (
<>
<StatusBar hidden />
<UserProfileProvider>
<NavigationContainer>
<Stack.Navigator
initialRouteName={TopNavScreen.SPLASH}
screenOptions={{ headerShown: false }}
>
<Stack.Screen
name={TopNavScreen.SPLASH}
component={SplashScreen}
/>
<Stack.Screen
name={TopNavScreen.AUTHENTICATE}
component={AuthenticateScreen}
/>
<Stack.Screen
name={TopNavScreen.HOME}
component={HomeScreen}
options={{ gestureEnabled: false }}
/>
<Stack.Screen
name={TopNavScreen.SEND}
component={SendStack}
/>
<Stack.Screen
name={TopNavScreen.PROFILE}
component={ProfileStack}
/>
</Stack.Navigator>
</NavigationContainer>
</UserProfileProvider>
</>
);
}