App.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. */
  7. import {NavigationContainer} from '@react-navigation/native';
  8. import React from 'react';
  9. import 'react-native-gesture-handler';
  10. import {createNativeStackNavigator} from '@react-navigation/native-stack';
  11. import {
  12. SafeAreaView,
  13. ScrollView,
  14. StatusBar,
  15. StyleSheet,
  16. Text,
  17. useColorScheme,
  18. View,
  19. } from 'react-native';
  20. import LoginPage from './screens/LoginPage';
  21. import HomePageNavigator from './navigation/HomePageNavigator';
  22. const AppStack = createNativeStackNavigator();
  23. const App = () => {
  24. return (
  25. <NavigationContainer>
  26. <AppStack.Navigator iniialRouteName="Home" headerShown={true}>
  27. <AppStack.Screen
  28. name="Login"
  29. component={LoginPage}
  30. options={{
  31. headerShown: false,
  32. }}
  33. />
  34. <AppStack.Screen
  35. name="Home"
  36. component={HomePageNavigator}
  37. options={{headerShown: false}}
  38. />
  39. </AppStack.Navigator>
  40. {/* <View style={styles.appContainer}>
  41. <Text>App</Text>
  42. </View> */}
  43. </NavigationContainer>
  44. );
  45. };
  46. const styles = StyleSheet.create({
  47. appContainer: {
  48. flex: 1,
  49. },
  50. });
  51. export default App;