33 lines
742 B
TypeScript
33 lines
742 B
TypeScript
import { lazy } from 'solid-js'
|
|
import Layout from '../layouts/Layout.tsx'
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
component: (props: any) => <Layout>{props.children}</Layout>,
|
|
children: [
|
|
{
|
|
path: '/',
|
|
component: lazy(() => import('../pages/IndexPage/Index.tsx')),
|
|
},
|
|
{
|
|
path: '/main',
|
|
component: lazy(() => import('../pages/MainPage/Main.tsx')),
|
|
},
|
|
{
|
|
path: '/register',
|
|
component: lazy(() => import('../pages/RegisterPage/Register.tsx')),
|
|
},
|
|
{
|
|
path: '/login',
|
|
component: lazy(() => import('../pages/LoginPage/Login.tsx')),
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: '**',
|
|
component: () => <div>404</div>,
|
|
},
|
|
]
|
|
|
|
export default routes
|