vtex-apps / product-summary

VTEX Product Summary app
11 stars 51 forks source link

fix getDefaultSeller and onCompleted function #337

Closed hiagolcm closed 2 years ago

hiagolcm commented 3 years ago

What problem is this solving?

  1. The getDefaultSeller was using the Price to get the default seller instead of the spotPrice.
  2. Due to an Apollo behavior , the onCompleted function in the useQuery is execute only once. This was causing an issue with the price when the product is rerendered. Check the video below.

https://user-images.githubusercontent.com/40380674/132251932-a9ca7de2-0de7-4b97-9207-26333dfe21a5.mov

How to test it?

Workspace

Related to / Depends on

https://github.com/vtex-apps/product-summary-context/pull/21

vtex-io-ci-cd[bot] commented 3 years ago

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

vtex-io-docs-bot[bot] commented 3 years ago

Beep boop :robot:

I noticed you didn't make any changes at the docs/ folder

In order to keep track, I'll create an issue if you decide now is not a good time