Function
Product
({product: {image, name, slug, price}})
Source from the content-addressed store, hash-verified
| 3 | import { urlFor } from '../lib/client' |
| 4 | |
| 5 | const Product = ({product: {image, name, slug, price}}) => { |
| 6 | return ( |
| 7 | <div> |
| 8 | <Link href={`/product/${slug.current}`}> |
| 9 | <div className='product-card'> |
| 10 | <img src={urlFor(image && image[0])} width={380} height={400} className='product-image' /> |
| 11 | <p className='product-name'>{name}</p> |
| 12 | <p className='product-price'>${price}</p> |
| 13 | </div> |
| 14 | </Link> |
| 15 | </div> |
| 16 | ) |
| 17 | } |
| 18 | |
| 19 | export default Product |
Callers
nothing calls this directly
Tested by
no test coverage detected