From 33a9275aa252a1889009955f3338831efa57fd5f Mon Sep 17 00:00:00 2001 From: Antoine VERMANDER Date: Mon, 1 Jun 2026 21:33:12 +0900 Subject: [PATCH 1/9] Created new file in components folder for the header --- src/components/header.jsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/components/header.jsx diff --git a/src/components/header.jsx b/src/components/header.jsx new file mode 100644 index 0000000..e69de29 From 7e96b083237f9e5967dde720ca023787a672e400 Mon Sep 17 00:00:00 2001 From: Antoine VERMANDER Date: Mon, 1 Jun 2026 22:02:42 +0900 Subject: [PATCH 2/9] Copied header code in new file plus function creation --- src/components/header.jsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/components/header.jsx b/src/components/header.jsx index e69de29..b237899 100644 --- a/src/components/header.jsx +++ 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 From f8d3eda2868a2c003385e256a24b1bd1a49da156 Mon Sep 17 00:00:00 2001 From: Antoine VERMANDER Date: Mon, 1 Jun 2026 22:07:02 +0900 Subject: [PATCH 3/9] Added Layout file in components folder --- src/components/layout.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/components/layout.jsx diff --git a/src/components/layout.jsx b/src/components/layout.jsx new file mode 100644 index 0000000..05dc0d3 --- /dev/null +++ b/src/components/layout.jsx @@ -0,0 +1,13 @@ +import { Outlet } from "react-router-dom"; +import Header from "./Header"; + +export default function Layout() { + return ( +
+
+
+ +
+
+ ); +} \ No newline at end of file From 43b8a9a407b73fd7d5f02faba674d05dc27cf6e9 Mon Sep 17 00:00:00 2001 From: Antoine VERMANDER Date: Mon, 1 Jun 2026 22:33:39 +0900 Subject: [PATCH 4/9] Added Route to test the header code --- src/App.jsx | 29 +++++++++++------------------ src/components/layout.jsx | 2 +- 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 6d5448c..815fda4 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,6 +3,7 @@ //
tests whether reusable panel and vertical spacing classes work. //

tests title style +import Layout from "./components/Layout.jsx"; import OpeningPage from "./pages/OpeningPage.jsx"; import RegisterPage from "./pages/RegisterPage.jsx"; import LoginPage from "./pages/LoginPage.jsx"; @@ -15,25 +16,17 @@ import ShopPage from "./pages/ShopPage.jsx"; import MemoryArchivePage from "./pages/MemoryArchivePage.jsx"; function App() { - return ; - - /* - return ( -
-
-
-

Nacimiento - My Egg

-

- Frontend setup is ready. -

- -
-
-
+ return ( + + + }> + } /> + + } /> + + + ); - */ } export default App; \ No newline at end of file diff --git a/src/components/layout.jsx b/src/components/layout.jsx index 05dc0d3..fb3fadf 100644 --- a/src/components/layout.jsx +++ b/src/components/layout.jsx @@ -1,7 +1,7 @@ import { Outlet } from "react-router-dom"; import Header from "./Header"; -export default function Layout() { +export default function layout() { return (
From 00f3181c700817adecc8778383495f6462f8c921 Mon Sep 17 00:00:00 2001 From: Antoine VERMANDER Date: Mon, 1 Jun 2026 22:48:34 +0900 Subject: [PATCH 5/9] Header Automatically present for everypage added --- package-lock.json | 60 +++++++++++++++++++++++++++++++++- package.json | 3 +- src/App.jsx | 16 +++++---- src/components/layout.jsx | 13 -------- src/pages/EggDashboardPage.jsx | 11 ------- 5 files changed, 70 insertions(+), 33 deletions(-) delete mode 100644 src/components/layout.jsx diff --git a/package-lock.json b/package-lock.json index aae39d6..3645bc1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,8 @@ "version": "0.0.0", "dependencies": { "react": "^19.2.6", - "react-dom": "^19.2.6" + "react-dom": "^19.2.6", + "react-router-dom": "^7.16.0" }, "devDependencies": { "@eslint/js": "^10.0.1", @@ -1068,6 +1069,19 @@ "dev": true, "license": "MIT" }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -2141,6 +2155,44 @@ "react": "^19.2.6" } }, + "node_modules/react-router": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.16.0.tgz", + "integrity": "sha512-wArC8lVyJb3+jM9OpDyW6hLCizACWkvQR/sSGqSs+o5uEXEtGlqdZ4v8hENR3Jad6i+LRkK93q/+bQAcvl6V1A==", + "license": "MIT", + "dependencies": { + "cookie": "^1.0.1", + "set-cookie-parser": "^2.6.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + } + } + }, + "node_modules/react-router-dom": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.16.0.tgz", + "integrity": "sha512-kMUAbimWB5FVbF4Bce4bJsiKJWLIUHq/mEG8+CFDnCSgltptBiG5nguducmsJeGKytlCvQud9Qhzpn49iduTlA==", + "license": "MIT", + "dependencies": { + "react-router": "7.16.0" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/rolldown": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.2.tgz", @@ -2191,6 +2243,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "license": "MIT" + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", diff --git a/package.json b/package.json index c67d618..07ff890 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,8 @@ }, "dependencies": { "react": "^19.2.6", - "react-dom": "^19.2.6" + "react-dom": "^19.2.6", + "react-router-dom": "^7.16.0" }, "devDependencies": { "@eslint/js": "^10.0.1", diff --git a/src/App.jsx b/src/App.jsx index 815fda4..7489b78 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -3,7 +3,8 @@ //
tests whether reusable panel and vertical spacing classes work. //

tests title style -import Layout from "./components/Layout.jsx"; +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"; @@ -15,16 +16,17 @@ import InventoryPage from "./pages/InventoryPage.jsx"; import ShopPage from "./pages/ShopPage.jsx"; import MemoryArchivePage from "./pages/MemoryArchivePage.jsx"; +/*This App code is only temporary to test the header functionnality*/ function App() { return ( - - }> - } /> - +
+
+ + } /> } /> - - + +
); } diff --git a/src/components/layout.jsx b/src/components/layout.jsx deleted file mode 100644 index fb3fadf..0000000 --- a/src/components/layout.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import { Outlet } from "react-router-dom"; -import Header from "./Header"; - -export default function layout() { - return ( -
-
-
- -
-
- ); -} \ No newline at end of file diff --git a/src/pages/EggDashboardPage.jsx b/src/pages/EggDashboardPage.jsx index fc44595..df43986 100644 --- a/src/pages/EggDashboardPage.jsx +++ b/src/pages/EggDashboardPage.jsx @@ -9,17 +9,6 @@ import windowBackgroundImage from "../assets/background.png"; function EggDashboardPage() { return (
-
-

Nacimiento - My Egg

- -
-
- USER NAME - N Days -
-
-
-
From 6b683ef3ad8f1d29047a58d476b2a81ffa77c72c Mon Sep 17 00:00:00 2001 From: Antoine VERMANDER Date: Mon, 1 Jun 2026 22:50:38 +0900 Subject: [PATCH 6/9] Removed every redundant instance of header in the pages --- src/pages/EggDashboardPage.jsx | 1 - src/pages/InventoryPage.jsx | 16 ---------------- src/pages/MemoryArchivePage.jsx | 17 ----------------- src/pages/ProfilePage.jsx | 17 ----------------- src/pages/ShopPage.jsx | 12 ------------ src/pages/ViewPostPage.jsx | 16 ---------------- src/pages/WritePostPage.jsx | 17 ----------------- 7 files changed, 96 deletions(-) diff --git a/src/pages/EggDashboardPage.jsx b/src/pages/EggDashboardPage.jsx index df43986..889a1b4 100644 --- a/src/pages/EggDashboardPage.jsx +++ b/src/pages/EggDashboardPage.jsx @@ -9,7 +9,6 @@ import windowBackgroundImage from "../assets/background.png"; function EggDashboardPage() { return (
-
-
-
Nacimiento
- - - -
-
- USER NAME - N Days -
-
-
-
diff --git a/src/pages/MemoryArchivePage.jsx b/src/pages/MemoryArchivePage.jsx index 03ba401..c2351bd 100644 --- a/src/pages/MemoryArchivePage.jsx +++ b/src/pages/MemoryArchivePage.jsx @@ -391,23 +391,6 @@ function MemoryArchivePage() { return (
-
-
Nacimiento
- - - -
-
- USER NAME - N Days -
-
-
-
-