diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 415b2faf..ad1df836 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -17,6 +17,7 @@ "react-oidc-context": "^3.1.0", "react-progressbar-fancy": "^1.1.4", "react-router-dom": "^6.23.1", + "react-toastify": "^10.0.5", "reactjs-popup": "^2.0.6" }, "devDependencies": { @@ -1413,12 +1414,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1489,6 +1490,14 @@ "node": ">= 6" } }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -1883,9 +1892,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -2633,6 +2642,18 @@ "react-dom": ">=16.8" } }, + "node_modules/react-toastify": { + "version": "10.0.5", + "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-10.0.5.tgz", + "integrity": "sha512-mNKt2jBXJg4O7pSdbNUfDdTsK9FIdikfsIE/yUCxbAEXl4HMyJaivrVFcn3Elvt5xvCQYhUZm+hqTIu1UXM3Pw==", + "dependencies": { + "clsx": "^2.1.0" + }, + "peerDependencies": { + "react": ">=18", + "react-dom": ">=18" + } + }, "node_modules/reactjs-popup": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/reactjs-popup/-/reactjs-popup-2.0.6.tgz", diff --git a/frontend/package.json b/frontend/package.json index 9a6574b6..534f1444 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -19,6 +19,7 @@ "react-oidc-context": "^3.1.0", "react-progressbar-fancy": "^1.1.4", "react-router-dom": "^6.23.1", + "react-toastify": "^10.0.5", "reactjs-popup": "^2.0.6" }, "devDependencies": { diff --git a/frontend/src/App.css b/frontend/src/App.css index 17d29741..331050df 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -1,14 +1,23 @@ #root { display: flex; - flex-grow: 1; flex-direction: column; + width: 100%; min-height: 100vh; - flex-grow: 1; +} + +.navbar-nav .nav-item.active .nav-link { + color: #ffffff; /* Change to the desired color */ + text-shadow: 0 0 10px #ffffff; +} + +.main-content { + display: flex; + flex-direction: column; + flex-grow: 1; + margin-bottom: 2em; } .footer { display: flex; width: 100%; - position: fixed; - bottom: 0; } diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index a035eeae..25f62956 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,41 +1,97 @@ import { useAuth } from "react-oidc-context"; -import "./App.css"; import Footer from "./Components/Footer"; -import Navbar from "./Components/Navbar/Navbar"; +import Navbar from "./Components/Navbar"; import LandingPage from "./Components/LandingPage"; +import { BrowserRouter, Route, Routes } from "react-router-dom"; +import ProtectedRoute from "./lib/ProtectedRoute"; +import Settings from "./Components/Settings"; +import PetPage from "./Components/PetPage"; +import NotFound from "./Components/NotFound"; +import { ToastContainer, toast } from "react-toastify"; + +import "./App.css"; function App() { const auth = useAuth(); switch (auth.activeNavigator) { case "signinSilent": - return