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