Open History to see the last commit
1<% if (!fileRouter) { ignoreFile() } %>import { HeadContent, Outlet, Scripts, createRootRouteWithContext } from '@tanstack/solid-router'
2import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'
3
4<% if (addOnEnabled['solid-ui']) { %>
5import "@fontsource/inter"
6<% } %>
7
8<% if (addOnEnabled.start) { %>
9 import { HydrationScript } from 'solid-js/web'
10 import { Suspense } from 'solid-js'
11<% } %>
12
13<% if (addOns.length || integrations.length || routes.length) { %>import Header from '../components/Header'
14<% } %>
15<% for(const addOn of addOns) {
16 for(const init of addOn.main?.initialize || []) { %>
17 <%- init %>
18<% } } %>
19
20import styleCss from "../styles.css?url";
21
22export const Route = createRootRouteWithContext()({
23 head: () => ({
24 links: [{ rel: "stylesheet", href: styleCss }],
25 }),
26 shellComponent: RootComponent,
27})
28
29<% if (addOnEnabled.start) { %>
30function RootComponent() {
31 return (
32 <html>
33 <head>
34 <HydrationScript />
35 </head>
36 <body>
37 <HeadContent />
38 <Suspense>
39 <% if (addOns.length || integrations.length || routes.length) { %>
40 <Header />
41 <% } %>
42 <Outlet />
43 <TanStackRouterDevtools />
44 <% for(const integration of integrations.filter(i => i.type === 'layout')) { %>
45 <<%= integration.jsName %> />
46 <% } %>
47 </Suspense>
48 <Scripts />
49 </body>
50 </html>
51 );
52}
53<% } else { %>
54function RootComponent() {
55 return (
56 <>
57 <% for(const integration of integrations.filter(i => i.type === 'provider')) { %>
58 <<%= integration.jsName %>>
59 <% } %>
60 <HeadContent />
61 <% if (addOns.length || integrations.length || routes.length) { %>
62 <Header />
63 <% } %>
64 <Outlet />
65 <TanStackRouterDevtools />
66 <% for(const integration of integrations.filter(i => i.type === 'layout')) { %>
67 <<%= integration.jsName %> />
68 <% } %>
69 <% for(const integration of integrations.filter(i => i.type === 'provider').reverse()) { %>
70 </<%= integration.jsName %>>
71 <% } %>
72 <Scripts />
73 </>
74 )
75}
76<% } %>