odin-codespace/shopping-cart/src/App.jsx

17 lines
328 B
React
Raw Normal View History

2024-10-11 16:38:38 -04:00
import { useState } from "react";
2024-10-14 07:23:02 -04:00
import { Outlet } from "react-router-dom";
2024-10-13 11:41:36 -04:00
import "./App.css";
2024-10-11 16:38:38 -04:00
import Navbar from "./components/navbar";
function App() {
2024-10-14 07:23:02 -04:00
const [cart, setCart] = useState({});
2024-10-11 16:38:38 -04:00
return (
<>
2024-10-14 07:23:02 -04:00
<Navbar cartItems={cart} />
<Outlet context={[cart, setCart]} />
2024-10-11 16:38:38 -04:00
</>
);
}
export default App;