Closed gissleh closed 4 years ago
I like this suggestion, but currently it causes a "blinking" effect when submitting if it does not take a long time, since it will show up as black, and then immediately disappear. So we should think of a way to better indicate that the score is being submitted that doesn't cause this
I added a smooth transition with a delay, so this will only happen when the request is not immediately answered. You can test this by adding a setTimeout
around the sio call after the submitting state is set in the leg
component.
I've experienced that kcapp is sometimes slow to submit a visit, leaving me wondering if I didn't hit enter enough times. This PR tries to solve that ambiguity by making the total score white-on-black when the leg is being submitted.
Caveats:
this.state.submitting
in the leg component is set even if it's still pending confirmation from the user for a checkout or bust.