Fixed routing
This commit is contained in:
parent
9f60c27b60
commit
a271bdc64e
9 changed files with 55 additions and 57 deletions
27
src/routes.tsx
Normal file
27
src/routes.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import { lazy } from 'solid-js'
|
||||
import type { RouteDefinition } from '@solidjs/router'
|
||||
|
||||
import Index from './pages/IndexPage/Index'
|
||||
|
||||
export const routes: RouteDefinition[] = [
|
||||
{
|
||||
path: '/',
|
||||
component: Index,
|
||||
},
|
||||
{
|
||||
path: '/main',
|
||||
component: lazy(() => import('./pages/MainPage/Main')),
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
component: lazy(() => import('./pages/RegisterPage/Register.tsx')),
|
||||
},
|
||||
{
|
||||
path: '/login',
|
||||
component: lazy(() => import('./pages/LoginPage/Login.tsx')),
|
||||
},
|
||||
{
|
||||
path: '**',
|
||||
component: lazy(() => import('./errors/404')),
|
||||
},
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue