Merge pull request #19 from marbiano/pdp-add-to-wishlist

PDP add to wishlist
This commit is contained in:
B 2020-10-27 01:26:42 -03:00 committed by GitHub
commit cadfa6070b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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>
)