uberVerificationPageComponent.tsx 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. import {
  2. View,
  3. Text,
  4. Image,
  5. Pressable,
  6. Dimensions,
  7. ScrollView
  8. } from 'react-native';
  9. import { SafeAreaView } from 'react-native-safe-area-context';
  10. import { router } from 'expo-router';
  11. import { CrossLogoSvg } from '../global/SVG';
  12. import React from 'react';
  13. import NormalButton from '../global/normal_button';
  14. const UberVerificationPageComponent = () => {
  15. const couponData = [
  16. {
  17. number: '1',
  18. title: 'Uber 獨家充電優惠',
  19. description:
  20. '我們提供Uber司機獨家充電優惠,驗證後即享折扣,讓您更省錢充電。'
  21. },
  22. {
  23. number: '2',
  24. title: '快速驗證',
  25. description: '只需通過簡單步驟,輕鬆開啟專屬帳戶訪問。'
  26. },
  27. {
  28. number: '3',
  29. title: '輕鬆合作拍檔',
  30. description:
  31. '成為Crazy Charge合作拍檔!為Uber司機提供便利充電服務,獲得豐厚節省和獎勵。'
  32. }
  33. ];
  34. const CouponComponent = () => {
  35. return (
  36. <View
  37. style={{ borderWidth: 1 }}
  38. className="border-[#EEEEEE] rounded-2xl my-[5%] mx-[5%]"
  39. >
  40. <View className="mx-[5%] my-[3%]">
  41. {couponData.map((item, index) => (
  42. <React.Fragment key={index}>
  43. <View className="flex-row items-center">
  44. <Text className="text-5xl text-[#02677d] text-center w-10 mr-4">
  45. {item.number}
  46. </Text>
  47. <View className="flex-1">
  48. <Text className="text-lg text-[#222222]">
  49. {item.title}
  50. </Text>
  51. <Text className="text-base text-[#666666] mt-1">
  52. {item.description}
  53. </Text>
  54. </View>
  55. </View>
  56. {index < couponData.length - 1 && (
  57. <View className="h-0.5 w-full my-4 bg-[#EEEEEE]" />
  58. )}
  59. </React.Fragment>
  60. ))}
  61. </View>
  62. </View>
  63. );
  64. };
  65. const screenHeight = Dimensions.get('window').height;
  66. return (
  67. <SafeAreaView
  68. className="flex-1 bg-white"
  69. edges={['top', 'right', 'left']}
  70. >
  71. <ScrollView className="flex-1">
  72. <View
  73. style={{
  74. marginTop: 25,
  75. marginLeft: '5%',
  76. marginBottom: '5%'
  77. }}
  78. >
  79. <Pressable
  80. onPress={() => {
  81. if (router.canGoBack()) {
  82. router.back();
  83. } else {
  84. router.replace('/accountMainPage');
  85. }
  86. }}
  87. >
  88. <CrossLogoSvg />
  89. </Pressable>
  90. </View>
  91. <View>
  92. <Image
  93. source={require('../../assets/uberVerification.png')}
  94. resizeMode="contain"
  95. />
  96. </View>
  97. <CouponComponent />
  98. <View className="mx-[5%]">
  99. <NormalButton
  100. title={
  101. <Text className="text-white text-xl">下一步</Text>
  102. }
  103. onPress={() => router.push('uberUploadPage')}
  104. />
  105. </View>
  106. </ScrollView>
  107. </SafeAreaView>
  108. );
  109. };
  110. export default UberVerificationPageComponent;