App.tsx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 TeamScreen from './src/pages/Team';
  6. import DataScreen from './src/pages/Data';
  7. import PlayScreen from './src/pages/Play';
  8. import MatchScreen from './src/pages/Match';
  9. import MeScreen from './src/pages/Me';
  10. const Stack = createNativeStackNavigator();
  11. function App(): React.JSX.Element {
  12. return (
  13. <NavigationContainer>
  14. <Stack.Navigator initialRouteName="Team">
  15. <Stack.Screen
  16. name="Login"
  17. component={LoginScreen}
  18. options={{
  19. title: '登录',
  20. headerBackVisible: false,
  21. headerShown: false,
  22. }}
  23. />
  24. <Stack.Screen
  25. name="Team"
  26. component={TeamScreen}
  27. options={{
  28. title: '球队',
  29. headerBackVisible: false,
  30. headerShown: false,
  31. }}
  32. />
  33. <Stack.Screen
  34. name="Data"
  35. component={DataScreen}
  36. options={{
  37. title: '数据',
  38. headerBackVisible: false,
  39. headerShown: false,
  40. }}
  41. />
  42. <Stack.Screen
  43. name="Play"
  44. component={PlayScreen}
  45. options={{
  46. title: 'PLAY',
  47. headerBackVisible: false,
  48. headerShown: false,
  49. }}
  50. />
  51. <Stack.Screen
  52. name="Match"
  53. component={MatchScreen}
  54. options={{
  55. title: '赛事',
  56. headerBackVisible: false,
  57. headerShown: false,
  58. }}
  59. />
  60. <Stack.Screen
  61. name="Me"
  62. component={MeScreen}
  63. options={{
  64. title: '我的',
  65. headerBackVisible: false,
  66. headerShown: false,
  67. }}
  68. />
  69. </Stack.Navigator>
  70. </NavigationContainer>
  71. );
  72. }
  73. export default App;