mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Type changes
This commit is contained in:
@@ -81,7 +81,7 @@ const CartItem = ({
|
||||
<span>{price}</span>
|
||||
<button
|
||||
className="flex justify-end"
|
||||
onClick={() => removeItem({ itemId: item.id })}
|
||||
onClick={() => removeItem({ id: item.id })}
|
||||
>
|
||||
<Trash />
|
||||
</button>
|
||||
|
@@ -30,10 +30,8 @@ const ProductView: FC<Props> = ({ product, productData, className }) => {
|
||||
const addToCart = () => {
|
||||
// TODO: loading state by awating the promise
|
||||
addItem({
|
||||
item: {
|
||||
productId: product.entityId,
|
||||
variantId: product.variants.edges?.[0]?.node.entityId!,
|
||||
},
|
||||
productId: product.entityId,
|
||||
variantId: product.variants.edges?.[0]?.node.entityId!,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user