App.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. import { GestureHandlerRootView } from 'react-native-gesture-handler';
  23. const AppStack = createNativeStackNavigator();
  24. const App = () => {
  25. return (
  26. <NavigationContainer>
  27. <AppStack.Navigator iniialRouteName="Home" headerShown={true}>
  28. <AppStack.Screen
  29. name="Login"
  30. component={LoginPage}
  31. options={{
  32. headerShown: false,
  33. }}
  34. />
  35. <AppStack.Screen
  36. name="Home"
  37. component={HomePageNavigator}
  38. options={{ headerShown: false }}
  39. />
  40. </AppStack.Navigator>
  41. {/* <View style={styles.appContainer}>
  42. <Text>App</Text>
  43. </View> */}
  44. </NavigationContainer>
  45. );
  46. };
  47. const styles = StyleSheet.create({
  48. appContainer: {
  49. flex: 1,
  50. },
  51. });
  52. export default App;