App.tsx 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import React from 'react';
  2. import { NavigationContainer } from '@react-navigation/native';
  3. import { createNativeStackNavigator } from '@react-navigation/native-stack';
  4. import LoginScreen from './src/pages/Login';
  5. import HomeScreen from './src/pages/Home';
  6. import FaceScreen from './src/pages/Face';
  7. import CustomScreen from './src/pages/Custom';
  8. import UdpScreen from './src/pages/Udp';
  9. const Stack = createNativeStackNavigator();
  10. function App(): React.JSX.Element {
  11. return (
  12. <NavigationContainer>
  13. <Stack.Navigator initialRouteName="Udp">
  14. <Stack.Screen
  15. name="Udp"
  16. component={UdpScreen}
  17. options={{
  18. title: '测试udp',
  19. }}
  20. />
  21. <Stack.Screen
  22. name="Login"
  23. component={LoginScreen}
  24. options={{
  25. title: '登录',
  26. headerBackVisible: false,
  27. headerShown: false,
  28. }}
  29. />
  30. <Stack.Screen
  31. name="Home"
  32. component={HomeScreen}
  33. options={{
  34. title: '首页',
  35. headerBackVisible: false,
  36. headerShown: false,
  37. }}
  38. />
  39. <Stack.Screen
  40. name="Face"
  41. component={FaceScreen}
  42. options={{
  43. title: '人脸识别',
  44. }}
  45. />
  46. <Stack.Screen
  47. name="Custom"
  48. component={CustomScreen}
  49. options={{
  50. title: '自定义SDK',
  51. }}
  52. />
  53. </Stack.Navigator>
  54. </NavigationContainer>
  55. );
  56. }
  57. export default App;