import React from "react"; import ChessBoardSquare from "components/chess-board-square"; class ChessBoard extends React.Component { constructor(props) { super(props); } chessBoardRows() { const { store } = this.props; return store.getState().board; } chessBoardRow(row, rank) { return (
{Object.keys(row).map( (file) => )}
) } render() { return (
{Object.keys(this.chessBoardRows()).reverse().map( (rank) => this.chessBoardRow(this.chessBoardRows()[rank], rank) )}
); } } export default ChessBoard;