Updated Image Component implementation

This commit is contained in:
Luis Alvarez
2020-10-22 20:59:45 -05:00
parent ce8f0235f5
commit e0b1106980
8 changed files with 39 additions and 62 deletions

View File

@@ -4,7 +4,6 @@ import { Trash, Plus, Minus } from '@components/icon'
import usePrice from '@lib/bigcommerce/use-price'
import useUpdateItem from '@lib/bigcommerce/cart/use-update-item'
import useRemoveItem from '@lib/bigcommerce/cart/use-remove-item'
import getPathname from '@lib/get-pathname'
import s from './CartItem.module.css'
const CartItem = ({
@@ -58,7 +57,13 @@ const CartItem = ({
return (
<li className="flex flex-row space-x-8 py-6">
<div className="w-12 h-12 bg-violet relative overflow-hidden">
<Image src={getPathname(item.image_url)} width={60} height={60} />
<Image
src={item.image_url}
width={60}
height={60}
// The cart item image is already optimized and very small in size
unoptimized
/>
</div>
<div className="flex-1 flex flex-col justify-between text-base">
<span className="font-bold mb-3">{item.name}</span>