]> git.cworth.org Git - lmno.games/commitdiff
Drop extra PromptOption state for not showing a specific prompt
authorCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 21:44:47 +0000 (14:44 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 28 Jun 2020 21:44:47 +0000 (14:44 -0700)
It was fun for me to learn about how to use the useState hook,
but this only code path was only necessary for when I was not
planning to distribute negative votes through the server to
other clients.

I ended up distributing that state after all, which has the benefit
that hidden prompts stay hidden when reloading (and from one round to
the next). [One potential downside is that hidden prompts are
permanently hidden---they can't be made to appear again. Oh well!]

And now that the server is telling us about the prompts we've already
voted against, and we're already not dispalying those, we don't need
the additional state here to hide things on the client side before we
receive that notification from the server.


No differences found