Open timoteialbu opened 1 month ago
Published Pre-release for 72cf4e5ca081b4e8c145b0ee0b6b43b656fd967d with versions:
- @jobber/components@5.24.1-JOB-102528-72cf4e5.2+72cf4e5c
To install the new version(s) for Web run:
npm install @jobber/components@5.24.1-JOB-102528-72cf4e5.2+72cf4e5c
Latest commit: |
72cf4e5
|
Status: | ✅ Deploy successful! |
Preview URL: | https://6ced5bb1.atlantis.pages.dev |
Branch Preview URL: | https://job-102528-dedupe-toast.atlantis.pages.dev |
Motivations
Wanted to prevent a
Toast
from appearing multiple times if the page re-renders. Change theid
type that already existed to a string so that we can have more freedom in terms of what it can be. Was worried that allowing it to be a number might lead to collisions with the incrementaltoastKey
state we had as its likely someone would use1
or something as the id, which would be the same as auto generated one.Changes
Added
id
for theshowToast
method that de-dupes the Toast component and makes sure its not displayed multiple times when the page re-renders.In Atlantis we use Github's built in pull request reviews.