Open History to see the last commit
1import {
2 Outlet,
3 HeadContent,
4 Scripts,
5 createRootRoute,
6} from '@tanstack/react-router'
7import { TanStackRouterDevtools } from '@tanstack/react-router-devtools'
8
9import Header from '@/components/Header'
10
11import appCss from '@/styles.css?url'
12
13export const Route = createRootRoute({
14 head: () => ({
15 meta: [
16 {
17 charSet: 'utf-8',
18 },
19 {
20 name: 'viewport',
21 content: 'width=device-width, initial-scale=1',
22 },
23 {
24 title: 'TanStack Start Starter',
25 },
26 ],
27 links: [
28 {
29 rel: 'stylesheet',
30 href: appCss,
31 },
32 ],
33 }),
34
35 component: () => (
36 <RootDocument>
37 <Header />
38
39 <Outlet />
40 <TanStackRouterDevtools />
41 </RootDocument>
42 ),
43})
44
45function RootDocument({ children }: { children: React.ReactNode }) {
46 return (
47 <html lang="en">
48 <head>
49 <HeadContent />
50 </head>
51 <body className="bg-black">
52 {children}
53 <Scripts />
54 </body>
55 </html>
56 )
57}