|
1 | 1 | import { useEffect, lazy, Suspense } from "react"; |
2 | | -import { BrowserRouter, Routes, Route } from "react-router-dom"; |
| 2 | +import { BrowserRouter, Routes, Route, Link } from "react-router-dom"; |
| 3 | +import { MapPin } from "lucide-react"; |
3 | 4 | import { AppLayout } from "@/components/layout/app-layout"; |
4 | 5 | import { Spinner } from "@/components/ui/spinner"; |
5 | 6 | import { AppErrorBoundary } from "@/components/error/app-error-boundary"; |
@@ -129,6 +130,26 @@ function LoadingFallback() { |
129 | 130 | ); |
130 | 131 | } |
131 | 132 |
|
| 133 | +function NotFoundPage() { |
| 134 | + return ( |
| 135 | + <div className="mx-auto flex max-w-md flex-col items-center gap-4 px-4 pb-24 pt-16 text-center"> |
| 136 | + <div className="flex h-16 w-16 items-center justify-center rounded-2xl border border-white/10 bg-white/5"> |
| 137 | + <MapPin className="h-7 w-7 text-muted-foreground/40" /> |
| 138 | + </div> |
| 139 | + <h1 className="text-xl font-bold text-foreground">Page introuvable</h1> |
| 140 | + <p className="text-sm text-muted-foreground"> |
| 141 | + Cette adresse n'existe pas ou a été déplacée. |
| 142 | + </p> |
| 143 | + <Link |
| 144 | + to="/" |
| 145 | + className="mt-2 rounded-xl border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-foreground hover:bg-white/8 transition-colors" |
| 146 | + > |
| 147 | + Retour à l'accueil |
| 148 | + </Link> |
| 149 | + </div> |
| 150 | + ); |
| 151 | +} |
| 152 | + |
132 | 153 | export default function App() { |
133 | 154 | const { initialize, isLoading, authError } = useAuthStore(); |
134 | 155 |
|
@@ -219,6 +240,7 @@ export default function App() { |
219 | 240 | <Route path="/auth/callback" element={<AuthCallbackPage />} /> |
220 | 241 | <Route path="/login" element={<LoginPage />} /> |
221 | 242 | <Route path="/onboarding" element={<OnboardingPage />} /> |
| 243 | + <Route path="*" element={<NotFoundPage />} /> |
222 | 244 | </Route> |
223 | 245 | </Routes> |
224 | 246 | </Suspense> |
|
0 commit comments