SettingsPageNavigator.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import React from 'react'
  2. import { createNativeStackNavigator } from '@react-navigation/native-stack'
  3. import SettingsPage from '../screens/SettingsPage';
  4. import EditProfilePage from '../screens/EditProfilePage';
  5. import SecurityPage from '../screens/SecurityPage';
  6. import NotificationSettingsPage from '../screens/NotificationSettingsPage';
  7. import HelpPageNavigator from './HelpPageNavigator';
  8. const Stack = createNativeStackNavigator();
  9. const SettingsPageNavigator = ({ route, navigation}) => {
  10. return (
  11. <Stack.Navigator
  12. initialRouteName='SettingsMenu'
  13. >
  14. <Stack.Screen
  15. name="SettingsMenu"
  16. options={(navigation) => ({
  17. headerShown: false
  18. })}
  19. component={SettingsPage}
  20. />
  21. <Stack.Screen
  22. name="EditProfile"
  23. options={(navigation) => ({
  24. headerShown: false
  25. })}
  26. component={EditProfilePage}
  27. />
  28. <Stack.Screen
  29. name="Notification"
  30. options={(navigation) => ({
  31. headerShown: false
  32. })}
  33. component={NotificationSettingsPage}
  34. />
  35. <Stack.Screen
  36. name="Security"
  37. options={(navigation) => ({
  38. headerShown: false
  39. })}
  40. component={SecurityPage}
  41. />
  42. <Stack.Screen
  43. name="InviteFriends"
  44. options={(navigation) => ({
  45. headerShown: false
  46. })}
  47. component={EditProfilePage}
  48. />
  49. <Stack.Screen
  50. name="Help"
  51. options={(navigation) => ({
  52. headerShown: false
  53. })}
  54. component={HelpPageNavigator}
  55. />
  56. <Stack.Screen
  57. name="DarkMode"
  58. options={(navigation) => ({
  59. headerShown: false
  60. })}
  61. component={EditProfilePage}
  62. />
  63. <Stack.Screen
  64. name="LogOut"
  65. options={(navigation) => ({
  66. headerShown: false
  67. })}
  68. component={EditProfilePage}
  69. />
  70. </Stack.Navigator>
  71. )
  72. }
  73. export default SettingsPageNavigator;