Renaming and removing enhanced image

This commit is contained in:
Belen Curcio
2020-11-04 11:50:23 -03:00
parent 9e7abdfd2a
commit be11f7f32b
23 changed files with 48 additions and 558 deletions

View File

@@ -3,7 +3,7 @@ import cn from 'classnames'
import Link from 'next/link'
import type { ProductNode } from '@bigcommerce/storefront-data-hooks/api/operations/get-all-products'
import usePrice from '@bigcommerce/storefront-data-hooks/use-price'
import { EnhancedImage } from '@components/core'
import Image from 'next/image'
import s from './ProductCard.module.css'
import WishlistButton from '@components/wishlist/WishlistButton'
@@ -43,7 +43,7 @@ const ProductCard: FC<Props> = ({
{p.name}
</span>
</div>
<EnhancedImage
<Image
src={p.images.edges?.[0]?.node.urlOriginal!}
alt={p.images.edges?.[0]?.node.altText || 'Product Image'}
width={imgWidth}
@@ -69,7 +69,7 @@ const ProductCard: FC<Props> = ({
/>
</div>
<div className={s.imageContainer}>
<EnhancedImage
<Image
alt={p.name}
className={cn('w-full object-cover', s['product-image'])}
src={src}

View File

@@ -7,7 +7,7 @@ import s from './ProductView.module.css'
import { useUI } from '@components/ui/context'
import { Swatch, ProductSlider } from '@components/product'
import { Button, Container } from '@components/ui'
import { HTMLContent } from '@components/core'
import { HTMLContent } from '@components/common'
import usePrice from '@bigcommerce/storefront-data-hooks/use-price'
import useAddItem from '@bigcommerce/storefront-data-hooks/cart/use-add-item'