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
|
import { HouseIcon, InfoIcon, UserIcon } from '@phosphor-icons/react'
import type { Icon } from '@phosphor-icons/react'
import type { RouteObject } from 'react-router'
import App from './App.tsx'
import About from './About.tsx'
import Me from './Me.tsx'
export type PageRoute = RouteObject & {
handle?: { title: string; icon: Icon }
children?: PageRoute[]
}
export const pageRoutes = [
{
id: 'home',
index: true,
Component: App,
handle: { title: '首页', icon: HouseIcon },
},
{
id: 'about',
path: '/about',
handle: { title: '关于', icon: InfoIcon },
children: [
{
id: 'about-index',
index: true,
Component: About,
handle: { title: '关于概览', icon: InfoIcon },
},
{
id: 'about-me',
path: 'me',
Component: Me,
handle: { title: '关于我', icon: UserIcon },
},
],
},
] satisfies PageRoute[]
|