import { GoodsItem } from '@/services/mall'; import React from 'react'; import { StyleSheet, Text, View } from 'react-native'; import { GoodsCard } from './GoodsCard'; interface GoodsListProps { data: GoodsItem[]; onItemPress?: (item: GoodsItem) => void; } export function GoodsList({ data, onItemPress }: GoodsListProps) { if (!data || data.length === 0) { return ( 暂无商品 ); } return ( {data.map((item) => ( ))} ); } const styles = StyleSheet.create({ container: { flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'space-between', marginHorizontal: 7, marginTop: 10, paddingBottom: 100, }, empty: { paddingVertical: 50, alignItems: 'center', }, emptyText: { color: '#666', fontSize: 14, }, });