multiple changes to fix the wishlist

This commit is contained in:
Luis Alvarez
2021-02-26 21:35:09 -05:00
parent 3acca7cc17
commit 751011767a
8 changed files with 19 additions and 17 deletions

View File

@@ -30,7 +30,8 @@ const WishlistButton: FC<Props> = ({
const itemInWishlist = data?.items?.find(
// @ts-ignore Wishlist is not always enabled
(item) =>
item.product_id === productId && (item.variant_id as any) === variant.id
item.product_id === Number(productId) &&
(item.variant_id as any) === Number(variant.id)
)
const handleWishlistChange = async (e: any) => {