diff --git a/app/components/chess-board.js b/app/components/chess-board.js index c4ab223..4b0427c 100644 --- a/app/components/chess-board.js +++ b/app/components/chess-board.js @@ -10,10 +10,12 @@ class ChessBoard extends React.Component { this.state = defaultState; } - chessBoardRow(row) { + chessBoardRow(row, i) { return ( -
- {row.map((square) => )} +
+ {row.map( + (square, j) => + )}
) } @@ -21,7 +23,7 @@ class ChessBoard extends React.Component { render() { return (
- {this.state.board.map((row) => this.chessBoardRow(row))} + {this.state.board.map((row, i) => this.chessBoardRow(row, i))}
); }