diff --git a/my-app/src/App.jsx b/my-app/src/App.jsx index 1ee8f79..f1adb0c 100644 --- a/my-app/src/App.jsx +++ b/my-app/src/App.jsx @@ -14,6 +14,7 @@ import { Footer } from "./Components/Footer/Footer"; import { auth } from "./../firebase-config.js"; import { useState } from "react"; import { onAuthStateChanged } from "firebase/auth"; +import { BasketModal } from "./Components/BasketModal/BasketModal.jsx"; function App() { const quotes = [ @@ -22,6 +23,7 @@ function App() { ]; const [user, setUser] = useState(null); + onAuthStateChanged(auth, (res) => { setUser(res); }); @@ -33,29 +35,45 @@ function App() {
- }> - : } - > - : } - > - }> - : } - > + {user ? ( + <> + } + > + : } + > + : } + > + }> + : } + > + : } + > + + ) : ( + <> + : } + > + : + } + > + + )} }> - : } - > - : } - >