123456789101112131415161718192021222324252627282930313233343536 |
- import React from 'react';
- import { NavigationContainer } from '@react-navigation/native';
- import { createNativeStackNavigator } from '@react-navigation/native-stack';
- import LoginScreen from './src/pages/Login';
- import HomeScreen from './src/pages/Home';
- const Stack = createNativeStackNavigator();
- function App(): React.JSX.Element {
- return (
- <NavigationContainer>
- <Stack.Navigator initialRouteName="Udp">
- <Stack.Screen
- name="Login"
- component={LoginScreen}
- options={{
- title: '登录',
- headerBackVisible: false,
- headerShown: false,
- }}
- />
- <Stack.Screen
- name="Home"
- component={HomeScreen}
- options={{
- title: '首页',
- headerBackVisible: false,
- headerShown: false,
- }}
- />
- </Stack.Navigator>
- </NavigationContainer>
- );
- }
- export default App;
|