/** * 首页 NFT Group 卡片 */ import React, { useState, useEffect } from 'react'; import { postRequest } from '@/netWork/index'; import { getStorageData, setStorageData } from '@/storage/index'; import { Alert, Image, StyleSheet, Text, View, Pressable } from 'react-native'; export const NftGroupCard = (props: any) => { const jumpDetail = (groupId: any) => { props.navigation.navigate('NftGroupDetail', { groupId, navigation: props.navigation, }); }; return ( {props.nftData.length > 0 && ( NFT Group )} {props.nftData.map( (item: { nftGroupId: any; nftGroupIcon: any; nftGroupName: String; }) => ( { jumpDetail(item.nftGroupId) }} key={item.nftGroupId}> {item.nftGroupName} ), )} ); }; const styles = StyleSheet.create({ groupCard: { flex: 1, paddingLeft: 16, paddingRight: 16, }, groupList: { backgroundColor: '#fff', borderRadius: 10, }, groupItem: { paddingTop: 12, paddingBottom: 12, paddingLeft: 20, paddingRight: 20, flexDirection: 'row', }, title: { marginTop: 25, marginBottom: 8, }, groupIcon: { width: 40, height: 40, borderRadius: 4, marginRight: 20, }, groupName: { height: 30, lineHeight: 30, fontSize: 16, }, });