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

This commit is contained in:
okbel
2021-02-04 11:05:06 -03:00
28 changed files with 270 additions and 188 deletions

View File

@@ -40,10 +40,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)