]> git.cworth.org Git - lmno.games/commit
Fix to use server-sent state for whether player has answered/judged
authorCarl Worth <cworth@cworth.org>
Sun, 14 Jun 2020 22:14:44 +0000 (15:14 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 14 Jun 2020 22:14:44 +0000 (15:14 -0700)
commitfbd247880d7fa0d04aecb61c8960876a3c7a6033
treec7b7e9daec7b5829cfb3a40db485ff03cecfb58b
parent04b3139e734606e5281f7a784c3a04ce1b02cc4d
Fix to use server-sent state for whether player has answered/judged

Previously we were using a component state Boolean "submitted" for
this information, but that's fundamentally broken since if the client
reloads the page that state is lost, resulting in the user being
presented with the form as to submit a second time (which is not
allowed by the game).

So, now the rendering looks to see whether the current player's name
is in the list of submitted players, and if so, it does not display
the form. This is exactly what we want.
empathy/empathy.jsx