X-Git-Url: https://git.cworth.org/git?p=lmno.games;a=blobdiff_plain;f=empathy%2Fempathy.jsx;h=feff7775a99f782188474bab923da9e1580b8327;hp=0789b463fe5813cb3fc23b8cb4a84610dd32b2a5;hb=d7cc3b52d47ed3836cea1d82951ea4db6e8c591d;hpb=d49e0aa05e9204fcefa2e7e88653dcd5bdc73a06
diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx
index 0789b46..feff777 100644
--- a/empathy/empathy.jsx
+++ b/empathy/empathy.jsx
@@ -414,7 +414,13 @@ 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 => )}
+ {props.prompts.map(
+ prompt =>
+ )}
);
});
@@ -482,7 +488,8 @@ class Ambiguities extends React.PureComponent {
this.state = {
word_sets: word_sets,
- selected: null
+ selected: null,
+ starred: null
};
this.submitted = false;
@@ -497,7 +504,8 @@ class Ambiguities extends React.PureComponent {
const response = await fetch_post_json(
`judged/${this.props.prompt.id}`,{
- word_groups: this.state.word_sets.map(set => Array.from(set))
+ word_groups: this.state.word_sets.map(set => Array.from(set)),
+ kudos: Array.from(this.state.starred)
}
);
@@ -684,6 +692,21 @@ class Ambiguities extends React.PureComponent {
);
})}
+ {
+ event.stopPropagation();
+ this.setState({
+ starred: set
+ });
+ }}
+ >
+ {this.state.starred === set ?
+ 'â
' : 'â'
+ }
+
);
})}