const PromptOption = React.memo(props => {
const prompt = props.prompt;
- const [show_prompt, set_show_prompt] = React.useState(true);
-
- if (! show_prompt)
- return false;
if (prompt.votes_against.find(v => v === props.player.name))
return false;
onClick={(event) => {
event.stopPropagation();
fetch_post_json(`vote_against/${prompt.id}`);
- set_show_prompt(false);
}}
>
×