Files
ebook/src/config/router/routes.ts
koziavin 102ab3991b
All checks were successful
Deploy Application / deploy (push) Successful in 5s
change font-size 20px -> 15px
feat privacy page
feat titles-page
2025-06-15 19:15:32 +04:00

44 lines
893 B
TypeScript

import type { Component } from 'vue'
interface ChlidrenRoute {
path: string
name: string
component: () => Promise<Component>
props?: boolean
}
interface Route {
path: string
name: string
component: () => Promise<Component>
props?: boolean
children?: ChlidrenRoute[]
}
const routes: Route[] = [
{
path: '/',
name: 'home',
component: () => import('@/pages/mainPage/indexPage.vue'),
},
{
path: '/books/:slug',
name: 'book-detail',
component: () => import('@/pages/books/_slug/indexBookPage.vue'),
props: true,
children: [
{
path: ':titlesSlug',
name: 'book-titles',
component: () => import('@/pages/books/_slug/_titlesSlug/indexTitlesPage.vue'),
},
],
},
{
path: '/privacy',
name: 'privacy',
component: () => import('@/pages/privacy/privacyPage.vue'),
},
]
export default routes