Type changes

This commit is contained in:
Luis Alvarez
2020-10-07 15:27:22 -05:00
parent fe66a8d746
commit e874f43abc
5 changed files with 17 additions and 17 deletions

View File

@@ -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>

View File

@@ -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!,
})
}