MainStackNavigator.js 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import 'react-native-gesture-handler';
  2. import React from 'react';
  3. import { createStackNavigator } from '@react-navigation/stack';
  4. import { DefaultTheme } from 'react-native-paper'
  5. import Intro from '../screens/Intro';
  6. import Login from '../screens/Login';
  7. import { RegistrationFormProvider } from '../contexts/RegisterContext';
  8. import { MockProvider } from '../contexts/MockContext';
  9. import TabsNavigator from './TabsNavigator';
  10. import RegistrationStackNavigator from './RegistrationStackNavigator';
  11. import RegisterMain from '../screens/RegisterMain';
  12. const MainStack = createStackNavigator();
  13. const theme = {
  14. ...DefaultTheme,
  15. colors: {
  16. primary: '#df3f3f',
  17. accent: 'white',
  18. },
  19. }
  20. const MainStackNavigator = () => {
  21. return(
  22. <MockProvider><RegistrationFormProvider>
  23. <MainStack.Navigator screenOptions={{
  24. headerTransparent: true,
  25. headerTintColor: 'white',
  26. headerTitle: ""
  27. }} initialRouteName="MainTabs">
  28. <MainStack.Screen name="Intro" component={Intro} />
  29. <MainStack.Screen name="Login" component={Login} />
  30. <MainStack.Screen name="Registration" component={RegisterMain}/>
  31. <MainStack.Screen name="MainTabs" component={TabsNavigator} />
  32. </MainStack.Navigator>
  33. </RegistrationFormProvider></MockProvider>
  34. )
  35. }
  36. export default MainStackNavigator;