import React, { useState } from "react"; import Header from "./components/Layout/Header"; import Meals from "./components/Meals/Meals"; import Cart from "./components/Cart/Cart"; import CartProvider from "./store/CartProvider"; const App = () => { const [cartIsShown, setCartIsShown] = useState(false); const showCartHandler = () => { setCartIsShown(true); }; const hideCartHandler = () => { setCartIsShown(false); }; return ( {cartIsShown && ( )}
); }; export default App;