Open History to see the last commit
1import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router'
2import appCss from '../styles.css?url'
3
4const NotFound = () => (
5 <div className="flex h-screen items-center justify-center bg-gray-900 text-gray-300">
6 <h1>404 — Page Not Found</h1>
7 </div>
8)
9
10export const Route = createRootRoute({
11 head: () => ({
12 meta: [
13 { charSet: 'utf-8' },
14 { name: 'viewport', content: 'width=device-width, initial-scale=1' },
15 { title: 'TanStack AI — Cloudflare Sandbox Agent' },
16 ],
17 links: [
18 { rel: 'stylesheet', href: appCss },
19 {
20 rel: 'icon',
21 type: 'image/svg+xml',
22 href: 'https://tanstack.com/favicon-light.svg',
23 media: '(prefers-color-scheme: light)',
24 },
25 {
26 rel: 'icon',
27 type: 'image/svg+xml',
28 href: 'https://tanstack.com/favicon-dark.svg',
29 media: '(prefers-color-scheme: dark)',
30 },
31 ],
32 }),
33 notFoundComponent: NotFound,
34 shellComponent: RootDocument,
35})
36
37function RootDocument({ children }: { children: React.ReactNode }) {
38 return (
39 <html lang="en">
40 <head>
41 <HeadContent />
42 </head>
43 <body className="bg-gray-900">
44 {children}
45 <Scripts />
46 </body>
47 </html>
48 )
49}