import { View, Text, Image } from '@tarojs/components'
import './index.less'

const ProductCard = ({ product }) => {
  return (
    <View className='product-card'>
      <Image className='product-img' src={product.imageUrl} mode='widthFix' />
      <View className='product-content'>
        <Text className='title'>{product.name}</Text>
        <View className='price-row'>
          <Text className='price'>
            <Text className='currency'>¥</Text>
            {product.price}
          </Text>
          <Text className='original-price'>¥{product.originalPrice}</Text>
        </View>
      </View>
    </View>
  )
}

export default ProductCard