Open History to see the last commit
1import { createRootRoute, HeadContent, Scripts } from '@tanstack/react-router'
2import { TanStackDevtools } from '@tanstack/react-devtools'
3import { aiDevtoolsPlugin } from '@tanstack/react-ai-devtools'
4import Header from '@/components/Header'
5import appCss from '../styles.css?url'
6
7export const Route = createRootRoute({
8 head: () => ({
9 meta: [
10 {
11 charSet: 'utf-8',
12 },
13 {
14 name: 'viewport',
15 content: 'width=device-width, initial-scale=1',
16 },
17 {
18 title: 'TanStack AI Testing Panel',
19 },
20 ],
21 links: [
22 {
23 rel: 'stylesheet',
24 href: appCss,
25 },
26 ],
27 }),
28
29 shellComponent: RootDocument,
30})
31
32function RootDocument({ children }: { children: React.ReactNode }) {
33 return (
34 <html lang="en">
35 <head>
36 <HeadContent />
37 </head>
38 <body>
39 <Header />
40 <div className="min-h-screen bg-gray-900">{children}</div>
41 <TanStackDevtools
42 config={{ position: 'bottom-right' }}
43 plugins={[aiDevtoolsPlugin()]}
44 eventBusConfig={{ connectToServerBus: true }}
45 />
46 <Scripts />
47 </body>
48 </html>
49 )
50}