forked from TanStack/tanstack.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotFound.tsx
More file actions
28 lines (27 loc) · 874 Bytes
/
Copy pathNotFound.tsx
File metadata and controls
28 lines (27 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { Link } from '@tanstack/react-router'
export function NotFound({ children }: { children?: any }) {
return (
<div className="h-[50vh] flex flex-col items-center justify-center gap-6">
<h1 className="text-4xl font-bold">404 Not Found</h1>
<p className="text-lg text-gray-600 dark:text-gray-400">
The page you are looking for does not exist.
</p>
{children || (
<p className="flex items-center gap-2 flex-wrap">
<button
onClick={() => window.history.back()}
className="bg-emerald-500 text-white p-2 rounded uppercase font-black"
>
Go back
</button>
<Link
to="/"
className="bg-cyan-600 text-white p-2 rounded uppercase font-black"
>
Start Over
</Link>
</p>
)}
</div>
)
}