1

这是我需要使其可点击的卡片的代码,因为我需要导航到新屏幕并在点击卡片时将参数传递给它:

function ItemV({ title, url,verificationId,AttReq}) { //for verification items      
    return (
       <TouchableOpacity
          onPress={() => navigation.navigate('VerificationRequestDetails',
          {
             item:AttReq,
             img : url , 
             name : title,
             verificationId:verificationId
          ,})}
          style={[
             styles.item,
             { backgroundColor:'#ffffff' },
          ]}        
       >
        <Card title="Verification Request">
        <View style={styles.item}>
          <Image source={{ uri: url }} style={styles.image} />
            <Text style={styles.title}>{title}</Text> 
         </View>   
         <Text style={styles.paragraph}>You are required to verify this information</Text>  
        </Card>
       </TouchableOpacity>
    );
  }
4

0 回答 0