Skip to content

Commit 745b9d8

Browse files
committed
Fix some code
1 parent 59743b0 commit 745b9d8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ function App() {
1616
//increase points every second
1717
setPoints(points + pointsPerSecond); //increase points by points per second
1818
setSeconds(seconds + 1); //add 1 second
19+
updateClickers(); //update clickers value
20+
updateAutoClickers(); //update auto clickers value
1921
}, 1000);
2022
return () => {
2123
clearInterval(interval); //clear interval when component unmounts
@@ -41,7 +43,6 @@ function App() {
4143
}
4244
function addPointsFromClick() {
4345
//add points from clicking a button
44-
updateClickers(); //update clickers value
4546
setPoints(points + clickMultiplier); //increase points by 1 when button clicked
4647
setClicks(clicks + 1); //increase clicks made by 1
4748
}

0 commit comments

Comments
 (0)