vipQrPageComponent.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import { View, Text, ScrollView, Pressable, Image, useWindowDimensions } from 'react-native';
  2. import React, { useContext } from 'react';
  3. import { SafeAreaView } from 'react-native-safe-area-context';
  4. import { router } from 'expo-router';
  5. import { CrossLogoSvg, RightArrowIconSvg } from '../global/SVG';
  6. const VipQrPageComponent = () => {
  7. const { width } = useWindowDimensions();
  8. const qrCodeSize = width * 0.8; // 80% of screen width
  9. return (
  10. <SafeAreaView className="flex-1 bg-white" edges={['top', 'right', 'left']}>
  11. <ScrollView className="flex-1 mx-[5%]" showsVerticalScrollIndicator={false}>
  12. <View style={{ marginTop: 25 }}>
  13. <Pressable
  14. onPress={() => {
  15. router.replace('/mainPage');
  16. }}
  17. >
  18. <CrossLogoSvg />
  19. </Pressable>
  20. <Text style={{ fontSize: 45, marginVertical: 25 }}>專屬會員二維碼</Text>
  21. </View>
  22. <View className="items-center">
  23. <Text className="text-lg self-start mb-4">掃描以下二維碼即可進入專屬VIP區域。</Text>
  24. <Image
  25. source={require('../../assets/vipqrcode.png')}
  26. className=""
  27. style={{ width: qrCodeSize, height: qrCodeSize }}
  28. />
  29. </View>
  30. </ScrollView>
  31. </SafeAreaView>
  32. );
  33. };
  34. export default VipQrPageComponent;