]> git.cworth.org Git - lmno.games/blobdiff - tictactoe/tictactoe.jsx
tictactoe: Improve player-info block for the case of no assigned team
[lmno.games] / tictactoe / tictactoe.jsx
index a7614bcaf56168424da88827830cfbbea54be6c9..f5951f1ff26a4bb738dd26a13c74f13feed08ccf 100644 (file)
@@ -90,7 +90,8 @@ function PlayerInfo(props) {
   return (
     <div className="player-info">
       <h2>Player</h2>
   return (
     <div className="player-info">
       <h2>Player</h2>
-      {props.name}, ID: {props.id}, on team: {props.team}
+      {props.name}, ID: {props.id},
+      {props.team ? ` on team ${props.team}` : " not on a team"}
     </div>
   );
 }
     </div>
   );
 }