4
0
forked from crowetic/commerce

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