Fixed routing

This commit is contained in:
Patrick Alvin Alcala 2025-09-25 09:22:32 +08:00
parent 9f60c27b60
commit a271bdc64e
9 changed files with 55 additions and 57 deletions

27
src/routes.tsx Normal file
View 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')),
},
]