diff --git a/src/App.jsx b/src/App.jsx
index aa74504..635b0be 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -2,8 +2,7 @@
//
tests whether centered layout works.
// tests whether reusable panel and vertical spacing classes work.
// tests title style
-import { BrowserRouter, Routes, Route } from "react-router-dom";
-
+import Header from "./components/header.jsx";
import OpeningPage from "./pages/OpeningPage.jsx";
import RegisterPage from "./pages/RegisterPage.jsx";
import LoginPage from "./pages/LoginPage.jsx";
@@ -14,23 +13,43 @@ import EggDashboardPage from "./pages/EggDashboardPage.jsx";
import InventoryPage from "./pages/InventoryPage.jsx";
import ShopPage from "./pages/ShopPage.jsx";
import MemoryArchivePage from "./pages/MemoryArchivePage.jsx";
+import { BrowserRouter, Routes, Route, useLocation } from "react-router-dom";
+
+// 1. Create a wrapper component inside the Router context
+function AppContent() {
+ const location = useLocation();
+
+ // Define paths where you don't want the header
+ const hideHeaderPaths = ["/shop"];
+
+ return (
+ <>
+ {/* Only render Header if the current path isn't in the hide list */}
+ {!hideHeaderPaths.includes(location.pathname) && }
+
+
+
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+ } />
+
+
+ >
+ );
+}
+// 2. Keep your main App component clean
function App() {
return (
-
- } />
- } />
- } />
- } />
- } />
- } />
- } />
- } />
-
-
+
);
}
-export default App;
\ No newline at end of file
+export default App
\ No newline at end of file
diff --git a/src/components/header.jsx b/src/components/header.jsx
new file mode 100644
index 0000000..b237899
--- /dev/null
+++ b/src/components/header.jsx
@@ -0,0 +1,17 @@
+import { Link } from "react-router-dom";
+
+export default function Header() {
+ return (
+
+ Nacimiento - My Egg
+
+
+
+ USER NAME
+ N Days
+
+
+
+
+ );
+}
\ No newline at end of file
diff --git a/src/pages/EggDashboardPage.jsx b/src/pages/EggDashboardPage.jsx
index 57743ee..2d67a65 100644
--- a/src/pages/EggDashboardPage.jsx
+++ b/src/pages/EggDashboardPage.jsx
@@ -12,18 +12,6 @@ function EggDashboardPage() {
const { egg, loading } = useEgg();
return (
-
- Nacimiento - My Egg
-
-
-
- USER NAME
- N Days
-
-
-
-
-
-
- Nacimiento
-
-
-
-
-
- USER NAME
- N Days
-
-
-
-
diff --git a/src/pages/MemoryArchivePage.jsx b/src/pages/MemoryArchivePage.jsx
index 08eb2cb..98403eb 100644
--- a/src/pages/MemoryArchivePage.jsx
+++ b/src/pages/MemoryArchivePage.jsx
@@ -137,23 +137,6 @@ function MemoryArchivePage() {
return (
-
- Nacimiento
-
-
-
-
-
- USER NAME
- N Days
-
-
-
-
-