Make add to wishlist action to work

This commit is contained in:
Martin Bavio 2020-10-27 00:20:27 -03:00
parent 2c1f366f59
commit f843e6b12d

View File

@ -13,6 +13,7 @@ import { HTMLContent } from '@components/core'
import useAddItem from '@bigcommerce/storefront-data-hooks/dist/cart/use-add-item'
import type { ProductNode } from '@bigcommerce/storefront-data-hooks/dist/api/operations/get-product'
import { getProductOptions } from '../helpers'
import WishlistButton from '@components/wishlist/WishlistButton'
interface Props {
className?: string
@ -143,9 +144,11 @@ const ProductView: FC<Props> = ({ product, className }) => {
</div>
{/* TODO make it work */}
<div className={s.wishlistButton}>
<Heart />
</div>
<WishlistButton
className={s.wishlistButton}
productId={product.entityId}
variant={product.variants.edges?.[0]!}
/>
</div>
</Container>
)