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

__root.tsx

33 lines974 Bytes

1import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router'
2import appCss from '../styles.css?url'
3​
4export const Route = createRootRoute({
5 head: () => ({
6 meta: [
7 { charSet: 'utf-8' },
8 { name: 'viewport', content: 'width=device-width, initial-scale=1' },
9 { title: 'TanStack AI E2E Tests - Guitar Store' },
10 ],
11 links: [{ rel: 'stylesheet', href: appCss }],
12 }),
13 shellComponent: RootDocument,
14})
15​
16function RootDocument({ children }: { children: React.ReactNode }) {
17 return (
18 <html lang="en">
19 <head>
20 <HeadContent />
21 </head>
22 <body className="bg-gray-950 text-gray-100 min-h-screen">
23 <header className="border-b border-orange-500/20 bg-gray-900/80 px-4 py-3">
24 <h1 className="text-lg font-bold text-orange-400">
25 Guitar Store E2E
26 </h1>
27 </header>
28 <main className="flex-1">{children}</main>
29 <Scripts />
30 </body>
31 </html>
32 )