couponPageComponent.tsx 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { View, Text, Pressable, Dimensions } from 'react-native';
  2. import { SafeAreaView } from 'react-native-safe-area-context';
  3. import { router } from 'expo-router';
  4. import { CrossLogoSvg } from '../global/SVG';
  5. import CouponTabViewComponent from '../global/couponTabView';
  6. const CouponPageComponent = () => {
  7. const screenHeight = Dimensions.get('window').height;
  8. return (
  9. <SafeAreaView
  10. className="flex-1 bg-white"
  11. edges={['top', 'right', 'left']}
  12. >
  13. <View
  14. style={{ minHeight: screenHeight, flex: 1 }}
  15. className="mx-[5%]"
  16. >
  17. <View style={{ marginTop: 25 }}>
  18. <Pressable
  19. onPress={() => {
  20. if (router.canGoBack()) {
  21. router.back();
  22. } else {
  23. router.replace('/accountMainPage');
  24. }
  25. }}
  26. >
  27. <CrossLogoSvg />
  28. </Pressable>
  29. <Text style={{ fontSize: 45, marginVertical: 25 }}>
  30. 優惠券
  31. </Text>
  32. </View>
  33. <View className="flex-1 ">
  34. <CouponTabViewComponent
  35. titles={['可用優惠券', '已使用/失效']}
  36. />
  37. </View>
  38. </View>
  39. </SafeAreaView>
  40. );
  41. };
  42. export default CouponPageComponent;