Skip to content

Commit 098e531

Browse files
committed
Add cost text for upgrade clicker
1 parent acea204 commit 098e531

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/App.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import './App.css';
2-
import { useState } from 'react';
1+
import "./App.css";
2+
import { useState } from "react";
33
function App() {
44
//app compoment
55
const [points, setPoints] = useState(0); //set initial points to 0
@@ -33,7 +33,11 @@ function App() {
3333
{/*increase points from clicking a button*/}
3434
<button onClick={() => addPointsFromClick()}>Click to Add Points</button>
3535
{/*upgrade clicker button*/}
36-
<button onClick={() => upgradeClicker()}>Upgrade Clicker</button>
36+
<button onClick={() => upgradeClicker()}>
37+
Upgrade Clicker
38+
<br />
39+
Cost: {10 * Math.pow(2, clickMultiplier - 1)}
40+
</button>
3741
</div>
3842
);
3943
}

0 commit comments

Comments
 (0)