InTheFight / ITF-website

In The Fight is committed to the advancement of progressive politics that leads to structural change in our current social, political, and economic structures.
BSD Zero Clause License
1 stars 0 forks source link

Endorsements submission message #22

Closed zopa closed 3 years ago

zopa commented 3 years ago

Delay the submit message until actual success.

Hand-waving a bit here, but it seems like strange things happen to Promise control flow when the handlers don't take an argument. So I think what was going on with our "catch" branch was essentially the same issue we were seeing earlier with premature submitted: when a handler is a statement, rather than a function, it runs as soon as possible, rather than waiting for the Promise to settle.

fridaland commented 3 years ago

Thoughts on what kind of spinner we want to replace the "Pending" message?

fridaland commented 3 years ago

Actually - what do you think about merging this and updating with a spinner later? @zopa