-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathappNavigator.js
29 lines (29 loc) · 1.13 KB
/
appNavigator.js
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
import React from 'react';
import { PostHogProvider } from 'posthog-react-native';
import { createStackNavigator } from '@react-navigation/stack';
import SplashScreen from '@scenes/SplashScreen/';
import ExampleScreen from '@scenes/ExampleScreen';
import { NavigationContainer } from '@react-navigation/native';
import { setTopLevelNavigator } from '@services/navigationService';
import { getPostHogClient } from '@app/utils/posthogUtils';
const Stack = createStackNavigator();
/**
* The root screen contains the application's navigation.
*
* @see https://reactnavigation.org/docs/en/hello-react-navigation.html#creating-a-stack-navigator
*/
export default function AppNavigator() {
return (
<NavigationContainer ref={setTopLevelNavigator}>
<PostHogProvider client={getPostHogClient()}>
<Stack.Navigator
screenOptions={{ headerShown: false }}
initialRouteName="SplashScreen"
>
<Stack.Screen name="SplashScreen" component={SplashScreen} />
<Stack.Screen name="MainScreen" component={ExampleScreen} />
</Stack.Navigator>
</PostHogProvider>
</NavigationContainer>
);
}