RegistrationStackNavigator.js 1.6 KB

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