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

__root.tsx

49 lines909 Bytes

1import {
2 HeadContent,
3 Outlet,
4 Scripts,
5 createRootRoute,
6} from '@tanstack/solid-router'
7import { HydrationScript } from 'solid-js/web'
8import appCss from '../styles.css?url'
9import type { ParentProps } from 'solid-js'
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 Solid DB Example`,
23 },
24 ],
25 links: [
26 {
27 rel: `stylesheet`,
28 href: appCss,
29 },
30 ],
31 }),
32 shellComponent: RootDocument,
33 component: () => <Outlet />,
34})
35​
36function RootDocument(props: ParentProps) {
37 return (
38 <html lang="en">
39 <head>
40 <HeadContent />
41 <HydrationScript />
42 </head>
43 <body>
44 {props.children}
45 <Scripts />
46 </body>
47 </html>
48 )