X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=2867dab55c1873f97f79650f2774879c80ff8c11;hp=143acd930824a564af6a7153cbbd3b37006a54fc;hb=746e9ae5db16b40b47ef7669fcba6de2229e9eea;hpb=182083e7c5284b7e373a133dce71eac86cb365f7 diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 143acd9..2867dab 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -363,6 +363,45 @@ class CategoryRequest extends React.PureComponent { } } +const PromptOption = React.memo(props => { + + const prompt = props.prompt; + + if (prompt.votes_against.find(v => v === props.player.name)) + return false; + + return ( + + ); +}); + const PromptOptions = React.memo(props => { if (props.prompts.length === 0) @@ -375,29 +414,7 @@ const PromptOptions = React.memo(props => { Select any categories below that you'd like to play. You can choose as many as you'd like.

- {props.prompts.map(p => { - return ( - - ); - })} + {props.prompts.map(p => )} ); }); @@ -1138,8 +1155,8 @@ class Game extends React.PureComponent {