ApplyScreen.jsx 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import * as WebBrowser from 'expo-web-browser';
  2. import * as React from 'react';
  3. import { Div, Button } from 'react-native-magnus';
  4. import { useTranslation } from 'react-i18next';
  5. import Header from '../../components/Header';
  6. const info = new Map([
  7. [
  8. '商家',
  9. {
  10. title: '商家入驻',
  11. next: 'MerchatApply',
  12. },
  13. ],
  14. [
  15. '骑手',
  16. {
  17. title: '骑手招募',
  18. next: 'RiderApply',
  19. },
  20. ],
  21. [
  22. '商务',
  23. {
  24. title: '商务合作',
  25. next: 'CompanyApply',
  26. },
  27. ],
  28. ]);
  29. export default function ApplyScreen({ navigation, route }) {
  30. const { t } = useTranslation();
  31. const { params } = route;
  32. const { type } = params;
  33. const nowInfo = info.get(type);
  34. return (
  35. <>
  36. <Header title={nowInfo.title} />
  37. <Div flex={1} />
  38. <Button
  39. my={20}
  40. mx={10}
  41. bg="brand500"
  42. block
  43. onPress={() => navigation.navigate(nowInfo.next)}
  44. >
  45. {t('li-ji-shen-qing')}
  46. </Button>
  47. </>
  48. );
  49. }