-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
36 lines (32 loc) · 1.09 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
import 'react-native-gesture-handler';
import React from 'react';
import {NativeModules} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import Root from './src/components/Root';
import Blog from './src/components/Blog';
import Post from './src/components/Post';
import ModerationQueue from './src/components/ModerationQueue';
const Stack = createStackNavigator();
const App = () => {
const appStartedLaunchingAt =
NativeModules.PerformancePlugin.appInitTimestamp;
const [timeToLaunch] = React.useState(
new Date().getTime() - appStartedLaunchingAt,
);
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="Root"
component={Root}
initialParams={{timeToLaunch}}
/>
<Stack.Screen name="Blog" component={Blog} />
<Stack.Screen name="Post" component={Post} />
<Stack.Screen name="ModerationQueue" component={ModerationQueue} />
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;