mikkomcmenamin / blood-on-the-clocktower-app

Companion app for the game Blood on the Clocktower
5 stars 1 forks source link

Fix potential bug when refreshing page during "voting round" #15

Open jussisaurio opened 1 year ago

jussisaurio commented 1 year ago

Since voting round is local state, it gets cleared upon refresh. It can still be kept in local state if so desired, but the starting state for the useState() call needs to be derived from the current voters so that it resumes from the correct position.

jussisaurio commented 1 year ago

This is kind of remediated by the voting round being a manually started operation now. The ST should see who has voted so far and they can manually run the rest of the vote in this case. Maybe fix later, bit of an edge case.