From d1b224fb4410e5ae5a06a5a8edc707524f1c2b73 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 26 May 2020 21:20:22 -0700 Subject: [PATCH] Drop the game history interface. Not that it's bad to let the user go back and forth to see what happened, but the interface here was particularly clunky, (both for being rendered as a list of buttons and also for allowing the user to fire off new moves wen viewing old history state). This commit simply guts the rendering of the "moves" list. It doesn't yet remove the jumpTo code that's now dead. --- tictactoe/tictactoe.jsx | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tictactoe/tictactoe.jsx b/tictactoe/tictactoe.jsx index 654d55e..934faa8 100644 --- a/tictactoe/tictactoe.jsx +++ b/tictactoe/tictactoe.jsx @@ -137,17 +137,6 @@ class Game extends React.Component { const current = history[this.state.stepNumber]; const winner = calculateWinner(current.squares); - const moves = history.map((step, move) => { - const desc = move ? - 'Go to move #' + move : - 'Go to game start'; - return ( -
  • - -
  • - ); - }); - let status; if (winner) { status = "Winner: " + winner; @@ -165,7 +154,6 @@ class Game extends React.Component {
    {status}
    -
      {moves}
    ); -- 2.43.0