Fixed product types

This commit is contained in:
Luis Alvarez
2021-02-15 10:15:20 -05:00
parent c636fcbc4b
commit 62ed50a646
13 changed files with 70 additions and 85 deletions

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)