diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index d462ac1..a29c77b 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -40,6 +40,7 @@ import { PlanningsPage } from './pages/plannings'; import { Roadbook } from './pages/roadbook'; import { PrivacyPage } from './pages/privacy'; import { LegalsPage } from './pages/legals'; +import { NotFoundPage } from './pages/notFound'; const App: React.FC = () => { @@ -107,6 +108,9 @@ const App: React.FC = () => { } /> } /> } /> + + {/* Fallback */} + } /> diff --git a/frontend/src/pages/notFound.tsx b/frontend/src/pages/notFound.tsx new file mode 100644 index 0000000..7869aba --- /dev/null +++ b/frontend/src/pages/notFound.tsx @@ -0,0 +1,58 @@ +import { Link } from "react-router-dom"; +import { Navbar } from "../components/navbar"; +import { Footer } from "../components/footer"; +import { getToken } from "../services/requests/auth.service"; +import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card"; + +export const NotFoundPage = () => { + const isAuthenticated = Boolean(getToken()); + + return ( +
+ + +
+ + + + +

Erreur 404

+ + Page introuvable + +
+ + +

+ Oups, la page que tu cherches n'existe pas ou a été déplacée. +

+ +
+ + {isAuthenticated ? ( + + Retour à l'accueil + + ) : ( + + Se connecter + + )} +
+
+
+
+ +
+ ); +};