Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

WelcomePageNavigationContainer.js 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // @flow
  2. import { createDrawerNavigator } from '@react-navigation/drawer';
  3. import React from 'react';
  4. import { useTranslation } from 'react-i18next';
  5. import {
  6. helpScreenOptions,
  7. settingsScreenOptions,
  8. termsAndPrivacyScreenOptions,
  9. welcomeScreenOptions
  10. } from '../../conference/components/native/ConferenceNavigatorScreenOptions';
  11. import { screen } from '../../conference/components/native/routes';
  12. import HelpView from '../components/help/components/HelpView';
  13. import PrivacyView from '../components/privacy/components/PrivacyView';
  14. import SettingsView from '../components/settings/components/SettingsView';
  15. import TermsView from '../components/terms/components/TermsView';
  16. import CustomDrawerContent from './CustomDrawerContent';
  17. import WelcomePage from './WelcomePage.native';
  18. import { drawerContentOptions } from './constants';
  19. const DrawerStack = createDrawerNavigator();
  20. const WelcomePageNavigationContainer = () => {
  21. const { t } = useTranslation();
  22. return (
  23. <DrawerStack.Navigator
  24. /* eslint-disable-next-line react/jsx-no-bind */
  25. drawerContent = { props => <CustomDrawerContent { ...props } /> }
  26. screenOptions = { drawerContentOptions }>
  27. <DrawerStack.Screen
  28. component = { WelcomePage }
  29. name = { screen.welcome.main }
  30. options = { welcomeScreenOptions } />
  31. <DrawerStack.Screen
  32. component = { SettingsView }
  33. name = { screen.welcome.settings }
  34. options = {{
  35. ...settingsScreenOptions,
  36. title: t('settingsView.header')
  37. }} />
  38. <DrawerStack.Screen
  39. component = { TermsView }
  40. name = { screen.welcome.terms }
  41. options = {{
  42. ...termsAndPrivacyScreenOptions,
  43. title: t('termsView.header')
  44. }} />
  45. <DrawerStack.Screen
  46. component = { PrivacyView }
  47. name = { screen.welcome.privacy }
  48. options = {{
  49. ...termsAndPrivacyScreenOptions,
  50. title: t('privacyView.header')
  51. }} />
  52. <DrawerStack.Screen
  53. component = { HelpView }
  54. name = { screen.welcome.help }
  55. options = {{
  56. ...helpScreenOptions,
  57. title: t('helpView.header')
  58. }} />
  59. </DrawerStack.Navigator>
  60. );
  61. };
  62. export default WelcomePageNavigationContainer;