import { View, Text, TouchableOpacity, Image as NativeImage, } from "react-native"; import React, { memo } from "react"; import { useTailwind } from "tailwind-rn"; import { Image } from "expo-image"; import { useNavigation } from "@react-navigation/native"; function StreamerCard({ data }) { const navigation = useNavigation(); const tailwind = useTailwind(); const blurhash = "LcKUTa%gOYWBYRt6xuoJo~s8V@fk"; return ( navigation.navigate("StreamerProfile", { mid: data?.mid }) } > {/* 上方信息区域 */} {data?.name} {data?.gender === 1 ? ( ) : ( )} {data?.age}岁 {data?.city} 全网粉丝:{data?.fans}万 {/* 中部媒体区域 */} {data?.album?.images.map((item, index) => { if (index > 1) return; return ( {index === 1 && data?.album?.images.length > 2 && ( +{data?.album?.images.length - 2} )} ); })} {/* 下方标签区 */} {data?.is_active_within_a_week === 1 && ( )} {data?.tag?.map((item, index) => { if (index > 2) return; if (data?.is_active_within_a_week === 1 && index > 1) return; return ( {item} ); })} {data?.platforms?.map((item, index) => { if (index > 4) return; return ( {index === 4 && data?.platforms.length > 5 && ( +{data?.platforms.length - 5} )} ); })} ); } export default memo(StreamerCard);