import { Text, View } from '@tarojs/components'
import { memo, useCallback, useMemo, useState } from 'react'
import classNames from 'classnames'
import ProductItem from '../productItem'
import styles from './index.module.scss'
import ProductBlock from './productBlock'
import IconFont from '@/components/iconfont/iconfont'
import LabAndImg from '@/components/LabAndImg'
import { goLink } from '@/common/common'

interface Parma {
  orderData: any
}
export default memo((props: Parma) => {
  const { orderData = {} } = props
  const productList = useMemo(() => {
    return orderData?.product_details || []
  }, [orderData])
  return <>
    <View className={styles.product_list}>
      {productList?.map((item) => {
        return <ProductBlock key={item.id} productInfo={item} sale_mode_name={orderData?.sale_mode_name} />
      })}

    </View>
  </>
})
