mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-30 06:12:47 -07:00
68 lines
1.9 KiB
TypeScript
68 lines
1.9 KiB
TypeScript
// This file is auto-generated by Tuono
|
|
|
|
import { createRoute, dynamic } from 'tuono'
|
|
|
|
import RootLayoutImport from './routes/__layout'
|
|
|
|
const PostslayoutImport = dynamic(() => import('./routes/posts/__layout'))
|
|
const AboutImport = dynamic(() => import('./routes/about'))
|
|
const IndexImport = dynamic(() => import('./routes/index'))
|
|
const PostspostImport = dynamic(() => import('./routes/posts/[post]'))
|
|
const PostsIndexImport = dynamic(() => import('./routes/posts/index'))
|
|
const PostsMyPostImport = dynamic(() => import('./routes/posts/my-post'))
|
|
|
|
const rootRoute = createRoute({ isRoot: true, component: RootLayoutImport })
|
|
|
|
const Postslayout = createRoute({ component: PostslayoutImport, isRoot: true })
|
|
const About = createRoute({ component: AboutImport })
|
|
const Index = createRoute({ component: IndexImport })
|
|
const Postspost = createRoute({ component: PostspostImport })
|
|
const PostsIndex = createRoute({ component: PostsIndexImport })
|
|
const PostsMyPost = createRoute({ component: PostsMyPostImport })
|
|
|
|
// Create/Update Routes
|
|
|
|
const PostslayoutRoute = Postslayout.update({
|
|
getParentRoute: () => rootRoute,
|
|
})
|
|
|
|
const AboutRoute = About.update({
|
|
path: '/about',
|
|
getParentRoute: () => rootRoute,
|
|
})
|
|
|
|
const IndexRoute = Index.update({
|
|
path: '/',
|
|
getParentRoute: () => rootRoute,
|
|
})
|
|
|
|
const PostspostRoute = Postspost.update({
|
|
path: '/posts/[post]',
|
|
getParentRoute: () => PostslayoutRoute,
|
|
})
|
|
|
|
const PostsIndexRoute = PostsIndex.update({
|
|
path: '/posts',
|
|
getParentRoute: () => PostslayoutRoute,
|
|
})
|
|
|
|
const PostsMyPostRoute = PostsMyPost.update({
|
|
path: '/posts/my-post',
|
|
getParentRoute: () => PostslayoutRoute,
|
|
})
|
|
|
|
// Create and export the route tree
|
|
|
|
export const routeTree = rootRoute.addChildren([
|
|
IndexRoute,
|
|
AboutRoute,
|
|
PostslayoutRoute.addChildren([
|
|
PostsMyPostRoute,
|
|
PostsIndexRoute,
|
|
PostspostRoute,
|
|
]),
|
|
PostsMyPostRoute,
|
|
PostsIndexRoute,
|
|
PostspostRoute,
|
|
])
|