Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

NotFound.tsx

26 lines740 Bytes

1import { Link } from '@tanstack/solid-router'
2import type { JSX } from 'solid-js'
3​
4export function NotFound(props?: { children?: JSX.Element }) {
5 return (
6 <div class="space-y-2 p-2">
7 <div>
8 {props?.children || 'The page you are looking for does not exist.'}
9 </div>
10 <p class="flex items-center gap-2 flex-wrap">
11 <button
12 onClick={() => window.history.back()}
13 class="bg-cyan-600 text-white px-2 py-1 rounded-sm uppercase font-black text-sm"
14 >
15 Go back
16 </button>
17 <Link
18 to="/"
19 class="bg-cyan-600 text-white px-2 py-1 rounded-sm uppercase font-black text-sm"
20 >
21 Start Over
22 </Link>
23 </p>
24 </div>
25 )