File tree Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Expand file tree Collapse file tree 3 files changed +40
-3
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { Link } from "@tanstack/react-router"
2
+
3
+ export function NotFound ( ) {
4
+ return (
5
+ < div className = "min-h-screen flex items-center justify-center bg-gray-50" >
6
+ < div className = "max-w-md w-full bg-white rounded-lg shadow-lg p-8 text-center" >
7
+ < div className = "text-6xl font-bold text-gray-300 mb-4" > 404</ div >
8
+ < h1 className = "text-2xl font-bold text-gray-800 mb-4" >
9
+ Page Not Found
10
+ </ h1 >
11
+ < p className = "text-gray-600 mb-8" >
12
+ The page you're looking for doesn't exist or has been moved.
13
+ </ p >
14
+
15
+ < div className = "space-y-4" >
16
+ < Link to = "/" className = "block w-full" >
17
+ < button className = "w-full px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors" >
18
+ Go Home
19
+ </ button >
20
+ </ Link >
21
+
22
+ < div className = "flex space-x-4" >
23
+ < Link to = "/query" className = "flex-1" >
24
+ < button className = "w-full px-4 py-2 bg-green-100 text-green-700 rounded-lg hover:bg-green-200 transition-colors text-sm" >
25
+ Query Demo
26
+ </ button >
27
+ </ Link >
28
+ < Link to = "/electric" className = "flex-1" >
29
+ < button className = "w-full px-4 py-2 bg-blue-100 text-blue-700 rounded-lg hover:bg-blue-200 transition-colors text-sm" >
30
+ Electric Demo
31
+ </ button >
32
+ </ Link >
33
+ </ div >
34
+ </ div >
35
+ </ div >
36
+ </ div >
37
+ )
38
+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { createRouter as createTanstackRouter } from "@tanstack/react-router"
2
2
3
3
// Import the generated route tree
4
4
import { routeTree } from "./routeTree.gen"
5
+ import { NotFound } from "./components/NotFound"
5
6
6
7
import "./styles.css"
7
8
@@ -11,6 +12,7 @@ export const createRouter = () => {
11
12
routeTree,
12
13
scrollRestoration : true ,
13
14
defaultPreloadStaleTime : 0 ,
15
+ defaultNotFoundComponent : NotFound ,
14
16
} )
15
17
16
18
return router
You can’t perform that action at this time.
0 commit comments