Merge branch 'master' of https://github.com/vercel/commerce into agnostic

This commit is contained in:
Luis Alvarez
2021-02-03 17:13:59 -05:00
17 changed files with 114 additions and 88 deletions

View File

@@ -41,10 +41,8 @@ const ProductView: FC<Props> = ({ product }) => {
setLoading(true)
try {
await addItem({
productId: Number(product.id),
variantId: variant
? Number(variant.id)
: Number(product.variants[0].id),
productId: product.id,
variantId: variant ? variant.id : product.variants[0].id,
})
openSidebar()
setLoading(false)