From 413b73b9282a294e20dc400e243a57a0a6a1d12e Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 11 Jun 2020 16:01:06 -0700 Subject: [PATCH] empathy: Add a comman between player names And also simplify the code quite a bit, (using a simple join() function instead of a map with multiple span and literal {" "} elements. --- empathy/empathy.jsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/empathy/empathy.jsx b/empathy/empathy.jsx index 8c7b917..fcfea4d 100644 --- a/empathy/empathy.jsx +++ b/empathy/empathy.jsx @@ -656,12 +656,7 @@ class Game extends React.PureComponent { {state.scores.words.map(word => { return (
  • - {word.word}: - {word.players.map(p => { - return ( - {p}{" "} - ); - })} + {`${word.word}: ${word.players.join(', ')}`}
  • ); })} -- 2.43.0