You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does anyone else when testing run into an error where for some reason certain entries for Regular Price and Discounted Price can trigger the error catch from toast even if logically it is sound? For example:
Regular Price: 10000 and Discounted Price 8000 has been giving me issues.
Then, once the error is triggered, even if you remove the offer section, no matter what value you put in for regular price will trigger that same error message.
I hope this makes sense.
The text was updated successfully, but these errors were encountered:
ok fixed that by adding the Number() function to each price in the comparison operator
if (Number(discountedPrice) >= Number(regularPrice)) {
setLoading(false)
toast.error('Discounted price needs to be less than regular price')
return
}
However I still can't figure out why the toast error message will continue to pop up if you don't refresh the page after submitting a discounted price > regular price and then going through and fixing it. Any ideas?
Does anyone else when testing run into an error where for some reason certain entries for Regular Price and Discounted Price can trigger the error catch from toast even if logically it is sound? For example:
Regular Price: 10000 and Discounted Price 8000 has been giving me issues.
Then, once the error is triggered, even if you remove the offer section, no matter what value you put in for regular price will trigger that same error message.
I hope this makes sense.
The text was updated successfully, but these errors were encountered: