From a6efb4456338ae58e9cbcb8f9393635f0cca25eb Mon Sep 17 00:00:00 2001 From: riku929hr Date: Sun, 2 Jan 2022 15:47:30 +0900 Subject: [PATCH] delete unsafe vars --- src/Game.js | 2 +- src/actions.js | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Game.js b/src/Game.js index 526ed4d..719285a 100644 --- a/src/Game.js +++ b/src/Game.js @@ -26,7 +26,7 @@ class Game extends React.Component { } squares[i] = this.props.xIsNext ? "X" : "O"; - this.props.place(this.props.stepNumber, this.props.xIsNext); + this.props.place(); this.setState({ history: history.concat([ diff --git a/src/actions.js b/src/actions.js index 4cf17c0..3e33037 100644 --- a/src/actions.js +++ b/src/actions.js @@ -2,8 +2,6 @@ export const ActionType = { PLACE: "PLACE", }; -export const place = (stepNumber, xIsNext) => ({ +export const place = () => ({ type: ActionType.PLACE, - stepNumber, - xIsNext, });