Skip to content

Commit

Permalink
prevent startButton push while countdown
Browse files Browse the repository at this point in the history
  • Loading branch information
janibehm committed Sep 26, 2023
1 parent 28d8917 commit f1e291d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class App extends Component {
}

startCountDown = () => {
this.setState({ counter: 3 });
this.setState({ counter: 3, gameRunning: true });
this.intervalId = setInterval(() => {
this.setState((prevState) => {
if (prevState.counter < 1) {
Expand Down

0 comments on commit f1e291d

Please sign in to comment.