Skip to content

Commit 01d7ec8

Browse files
committed
Fixed the name of function
1 parent d81e223 commit 01d7ec8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/Restaurant/Restaurant.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { useState } from "react";
33
function Restaurant() {
44
const [pizzas, setPizzas] = useState(0);
55

6-
function buttonAdd() {
6+
function OrderOne() {
77
setPizzas(pizzas + 1);
88
}
99

@@ -13,7 +13,7 @@ function Restaurant() {
1313
<ul className="restaurant__list">
1414
<li className="restaurant__item">
1515
Pizzas: {pizzas}{" "}
16-
<button className="button restaurant__button" onClick={buttonAdd}>
16+
<button className="button restaurant__button" onClick={OrderOne}>
1717
Add
1818
</button>
1919
</li>

0 commit comments

Comments
 (0)