Open History to see the last commit
1<% if (!fileRouter) { ignoreFile() } %>import { Outlet, createRootRouteWithContext } from '@tanstack/solid-router'
2import { TanStackRouterDevtools } from '@tanstack/solid-router-devtools'<% for(const integration of integrations.filter(i => i.type === 'layout' || i.type === 'provider')) { %>
3import <%= integration.jsName %> from "<%= relativePath(integration.path) %>";
4<% } %>
5<% if (addOnEnabled['solid-ui']) { %>
6import "@fontsource/inter"
7<% } %>
8<% if (addOns.length || integrations.length || routes.length) { %>import Header from '../components/Header'
9<% } %>
10<% for(const addOn of addOns) {
11 for(const init of addOn.main?.initialize || []) { %>
12 <%- init %>
13<% } } %>
14
15export const Route = createRootRouteWithContext()({
16 component: RootComponent,
17})
18
19function RootComponent() {
20 return (
21 <>
22 <% for(const integration of integrations.filter(i => i.type === 'provider')) { %>
23 <<%= integration.jsName %>>
24 <% } %>
25 <% if (addOns.length || integrations.length || routes.length) { %>
26 <Header />
27 <% } %>
28 <Outlet />
29 {/* <TanStackRouterDevtools /> */}
30 <% for(const integration of integrations.filter(i => i.type === 'layout')) { %>
31 <<%= integration.jsName %> />
32 <% } %>
33 <% for(const integration of integrations.filter(i => i.type === 'provider').reverse()) { %>
34 </<%= integration.jsName %>>
35 <% } %>
36 </>
37 )
38}