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

This commit is contained in:
okbel
2021-02-18 11:45:57 -03:00
48 changed files with 1427 additions and 2092 deletions

View File

@@ -3,6 +3,7 @@ import cn from 'classnames'
import { Heart } from '@components/icons'
import { useUI } from '@components/ui'
import type { Product, ProductVariant } from '@commerce/types'
import useCustomer from '@framework/customer/use-customer'
import useAddItem from '@framework/wishlist/use-add-item'
import useRemoveItem from '@framework/wishlist/use-remove-item'

View File

@@ -7,6 +7,7 @@ import { Trash } from '@components/icons'
import { Button, Text } from '@components/ui'
import { useUI } from '@components/ui/context'
import type { Product } from '@commerce/types'
import usePrice from '@framework/product/use-price'
import useAddItem from '@framework/cart/use-add-item'
import useRemoveItem from '@framework/wishlist/use-remove-item'
@@ -42,8 +43,8 @@ const WishlistCard: FC<Props> = ({ product }) => {
setLoading(true)
try {
await addItem({
productId: product.id,
variantId: product.variants[0].id,
productId: String(product.id),
variantId: String(product.variants[0].id),
})
openSidebar()
setLoading(false)