Every time I click on the Link parent, it triggers a click event on the button as well. I want these events to be independent.
<Link className="product-item__link" to={`/products/${product.category}/${product.id}`} >
<div className='product-item'>
{/*Other elements are included here*/}
<button className="product-item__btn" onClick={() => addToCart(product)}>Add to cart</button>
</div>
</Link>