SalesforceCommerceCloud / pwa-kit

React-based JavaScript frontend framework to create a progressive web app (PWA) storefront for Salesforce B2C Commerce.
https://developer.salesforce.com/docs/commerce/pwa-kit-managed-runtime/guide/pwa-kit-overview.html
BSD 3-Clause "New" or "Revised" License
276 stars 124 forks source link

Recommended Products: fix toggling of the favorite icon (@W-16093853@) #1861

Closed vmarta closed 1 week ago

vmarta commented 1 week ago

This PR fixes a bug with the RecommendedProducts such that clicking on the heart icon would toggle the favourite state successfully. It was not doing anything at all previously.

Types of Changes

Breaking changes include:

  • Removing a public function or component or prop
  • Adding a required argument to a function
  • Changing the data type of a function parameter or return value
  • Adding a new peer dependency to package.json

Changes

How to Test-Drive This PR

  1. Visit this PLP: http://localhost:3000/global/en-GB/category/womens-clothing-tops
  2. Verify that you can still add one of the items there to your wishlist
  3. Now navigate to the PDP and scroll down to the recommended products section
  4. Verify that you can add one of the recommended products to your wishlist
  5. There's a success message and the heart icon is updated correctly

Checklists

General

Accessibility Compliance

You must check off all items in one of the follow two lists:

or...

Localization