|
| 1 | +import React, { useState, useRef } from 'react' |
| 2 | +import { View, Image, Text, StyleSheet } from 'react-native' |
| 3 | +import { |
| 4 | + widthPercentageToDP as wp, |
| 5 | + heightPercentageToDP as hp, |
| 6 | +} from 'react-native-responsive-screen' |
| 7 | +import Colors from '../../common/Colors' |
| 8 | +import Fonts from '../../common/Fonts' |
| 9 | +import { RFValue } from 'react-native-responsive-fontsize' |
| 10 | +import { AppBottomSheetTouchableWrapper } from '../AppBottomSheetTouchableWrapper' |
| 11 | +import FontAwesome from 'react-native-vector-icons/FontAwesome' |
| 12 | +import { ScrollView } from 'react-native-gesture-handler' |
| 13 | +import { translations } from '../../common/content/LocContext' |
| 14 | +import CrossButton from '../../assets/images/svgs/icons_close.svg' |
| 15 | + |
| 16 | +export default function BorderWalletKnowMore( props ) { |
| 17 | + const scrollViewRef = useRef<ScrollView>() |
| 18 | + const strings = translations[ 'accounts' ] |
| 19 | + |
| 20 | + return ( |
| 21 | + <View style={{ |
| 22 | + ...styles.modalContainer, ...props.containerStyle |
| 23 | + }}> |
| 24 | + <View style={{ |
| 25 | + height: hp( 81 ) |
| 26 | + }}> |
| 27 | + <View |
| 28 | + style={{ |
| 29 | + flexDirection: 'row', justifyContent: 'center', alignItems: 'center' |
| 30 | + }} |
| 31 | + > |
| 32 | + <Text style={styles.headerText}>Border Wallet</Text> |
| 33 | + <AppBottomSheetTouchableWrapper style={{ |
| 34 | + width: wp( 8 ), |
| 35 | + height: wp( 8 ), |
| 36 | + borderRadius: wp( 4 ), |
| 37 | + backgroundColor: Colors.blue, |
| 38 | + justifyContent: 'center', |
| 39 | + alignItems: 'center', |
| 40 | + marginRight: wp( 2 ), |
| 41 | + marginLeft: -wp( 10 ) |
| 42 | + }} |
| 43 | + onPress={() => props.titleClicked && props.titleClicked()}> |
| 44 | + <CrossButton /> |
| 45 | + </AppBottomSheetTouchableWrapper> |
| 46 | + </View> |
| 47 | + <View style={styles.headerSeparator} /> |
| 48 | + <ScrollView |
| 49 | + ref={scrollViewRef} |
| 50 | + style={{ |
| 51 | + // flex: 1, |
| 52 | + backgroundColor: Colors.blue, |
| 53 | + }} |
| 54 | + snapToInterval={hp( '85%' )} |
| 55 | + decelerationRate="fast" |
| 56 | + > |
| 57 | + <View style={styles.ElementView}> |
| 58 | + <Text |
| 59 | + style={{ |
| 60 | + ...styles.infoText, |
| 61 | + // marginTop: wp( '5%' ), |
| 62 | + }} |
| 63 | + > |
| 64 | + This is a wallet account added to your Tribe app using Border Wallet feature by either adding a new one or by importing an existing grid |
| 65 | + </Text> |
| 66 | + <View style={{ |
| 67 | + justifyContent: 'center', alignItems: 'center' |
| 68 | + }}> |
| 69 | + <Image |
| 70 | + source={require( '../../assets/images/icons/checking_account_info_1.png' )} |
| 71 | + style={styles.helperImage} |
| 72 | + /> |
| 73 | + </View> |
| 74 | + <Text |
| 75 | + style={{ |
| 76 | + ...styles.infoText, |
| 77 | + marginBottom: wp( '5%' ), |
| 78 | + }} |
| 79 | + > |
| 80 | + If you restore the app, all the accounts including this one will be reinstated. Alternatively you can back this up separately by going into account settings |
| 81 | + </Text> |
| 82 | + {/* <AppBottomSheetTouchableWrapper |
| 83 | + style={{ |
| 84 | + alignItems: 'center' |
| 85 | + }} |
| 86 | + onPress={() => { |
| 87 | + scrollViewRef.current && |
| 88 | + scrollViewRef.current.scrollTo( { |
| 89 | + x: 0, |
| 90 | + y: hp( '75%' ), |
| 91 | + animated: true, |
| 92 | + } ) |
| 93 | + }} |
| 94 | + > |
| 95 | + <FontAwesome |
| 96 | + name="angle-double-down" |
| 97 | + color={Colors.white} |
| 98 | + size={40} |
| 99 | + /> |
| 100 | + </AppBottomSheetTouchableWrapper> */} |
| 101 | + <View style={{ |
| 102 | + justifyContent: 'center', alignItems: 'center' |
| 103 | + }}> |
| 104 | + </View> |
| 105 | + </View> |
| 106 | + </ScrollView> |
| 107 | + </View> |
| 108 | + </View> |
| 109 | + ) |
| 110 | +} |
| 111 | +const styles = StyleSheet.create( { |
| 112 | + modalContainer: { |
| 113 | + // height: '80%', |
| 114 | + backgroundColor: Colors.blue, |
| 115 | + alignSelf: 'center', |
| 116 | + width: '100%', |
| 117 | + elevation: 10, |
| 118 | + shadowColor: Colors.borderColor, |
| 119 | + shadowOpacity: 10, |
| 120 | + shadowOffset: { |
| 121 | + width: 0, height: 2 |
| 122 | + }, |
| 123 | + }, |
| 124 | + headerText: { |
| 125 | + color: Colors.white, |
| 126 | + fontFamily: Fonts.Medium, |
| 127 | + fontSize: RFValue( 20 ), |
| 128 | + marginTop: hp( '2%' ), |
| 129 | + marginBottom: hp( '1%' ), |
| 130 | + flex: 1, |
| 131 | + textAlign: 'center' |
| 132 | + }, |
| 133 | + headerSeparator: { |
| 134 | + backgroundColor: Colors.homepageButtonColor, |
| 135 | + height: 1, |
| 136 | + marginLeft: wp( '5%' ), |
| 137 | + marginRight: wp( '5%' ), |
| 138 | + marginBottom: hp( '1%' ), |
| 139 | + }, |
| 140 | + infoText: { |
| 141 | + textAlign: 'center', |
| 142 | + color: Colors.white, |
| 143 | + fontSize: RFValue( 13 ), |
| 144 | + fontFamily: Fonts.Regular, |
| 145 | + marginLeft: wp( '8%' ), |
| 146 | + marginRight: wp( '8%' ), |
| 147 | + }, |
| 148 | + clickHereText: { |
| 149 | + color: Colors.white, |
| 150 | + fontSize: RFValue( 13 ), |
| 151 | + fontFamily: Fonts.Regular, |
| 152 | + textDecorationLine: 'underline', |
| 153 | + textAlign: 'center', |
| 154 | + }, |
| 155 | + toKnowMoreText: { |
| 156 | + color: Colors.white, |
| 157 | + fontSize: RFValue( 13 ), |
| 158 | + fontFamily: Fonts.Regular, |
| 159 | + }, |
| 160 | + linkView: { |
| 161 | + flexDirection: 'row', |
| 162 | + marginLeft: wp( '10%' ), |
| 163 | + marginRight: wp( '10%' ), |
| 164 | + justifyContent: 'center', |
| 165 | + flexWrap: 'wrap', |
| 166 | + }, |
| 167 | + ElementView: { |
| 168 | + height: hp( '75%' ), |
| 169 | + justifyContent: 'space-between', |
| 170 | + }, |
| 171 | + separatorView: { |
| 172 | + width: wp( '70%' ), |
| 173 | + height: 0, |
| 174 | + alignSelf: 'center', |
| 175 | + marginBottom: wp( '1%' ), |
| 176 | + borderStyle: 'dotted', |
| 177 | + borderWidth: 1, |
| 178 | + borderRadius: 1, |
| 179 | + borderColor: Colors.white, |
| 180 | + }, |
| 181 | + helperImage: { |
| 182 | + width: wp( '80%' ), |
| 183 | + height: wp( '60%' ), |
| 184 | + resizeMode: 'contain', |
| 185 | + }, |
| 186 | + bottomLinkView: { |
| 187 | + marginLeft: wp( '10%' ), |
| 188 | + marginRight: wp( '10%' ), |
| 189 | + marginBottom: wp( '15%' ), |
| 190 | + }, |
| 191 | +} ) |
0 commit comments