App.js 1.2 KB

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