File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import Footer from "../Footer/Footer";
44import Deck from "../Deck/Deck" ;
55import AppHeader from "../AppHeader/AppHeader" ;
66import Restaurant from "../Restaurant/Restaurant" ;
7- import RestaurantButton from "../RestaurantButton/RestaurantButton" ;
87
98const App = ( ) => (
109 < div className = "app" >
@@ -16,7 +15,6 @@ const App = () => (
1615 </ div >
1716 < Bookings />
1817 < Restaurant />
19- < RestaurantButton OrderOne = { Restaurant ( ) . OrderOne } />
2018 < Deck />
2119
2220 < Footer
Original file line number Diff line number Diff line change 11import { useState } from "react" ;
2+ import RestaurantButton from "../RestaurantButton/RestaurantButton" ;
23
34function Restaurant ( ) {
45 const [ pizzas , setPizzas ] = useState ( 0 ) ;
56
67 const OrderOne = ( ) => {
78 setPizzas ( pizzas + 1 ) ;
8- }
9+ } ;
910
1011 return (
1112 < section className = "restaurant" >
1213 < h3 className = "restaurant__heading" > Restaurant Orders</ h3 >
1314 < ul className = "restaurant__list" >
14- < li className = "restaurant__item" >
15- Pizzas: { pizzas } { " " }
16- </ li >
15+ < li className = "restaurant__item" > Pizzas: { pizzas } </ li >
1716 </ ul >
17+ < RestaurantButton OrderOne = { OrderOne } />
1818 </ section >
1919 ) ;
2020}
You can’t perform that action at this time.
0 commit comments