-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.tsx
More file actions
41 lines (39 loc) · 981 Bytes
/
Copy pathroutes.tsx
File metadata and controls
41 lines (39 loc) · 981 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import type { RouteObject } from 'type-safe-react-router';
import { Books } from './components/Books';
import { Book } from './components/Book';
import { Chapters } from './components/Chapters';
import { Chapter } from './components/Chapter';
import { Author } from './components/Author';
export const routes = [
{
slug: 'books',
path: '/',
element: <Books />,
children: [
{
slug: 'book',
path: 'book/:bookId',
element: <Book />,
children: [
{
slug: 'chapters',
path: 'chapters',
element: <Chapters />,
children: [
{
slug: 'chapter',
path: ':chapterId',
element: <Chapter />,
},
],
},
{
slug: 'author',
path: 'author',
element: <Author />,
},
],
},
],
},
] as const satisfies RouteObject[];