Done setup template

This commit is contained in:
2024-06-01 12:34:20 +00:00
parent 71d4afcc5e
commit 449a5f644f
104 changed files with 313 additions and 256 deletions

30
frontend/src/index.jsx Normal file
View File

@ -0,0 +1,30 @@
import Layout from '@pages/Layout'
import { Route, Router } from '@solidjs/router'
import { For, lazy } from 'solid-js'
import { render } from 'solid-js/web'
import App from './App'
import './index.css'
import { ROUTES } from './routes'
const root = document.getElementById('root')
render(
() => (
<Router root={App}>
<Route path="/login" component={lazy(() => import('@pages/Login'))} />
<Route path="/" component={Layout}>
<For each={ROUTES}>
{(route) => (
<Route
path={route.path}
component={route.components}
matchFilters={route.filter}
/>
)}
</For>
</Route>
<Route path="*" component={lazy(() => import('@pages/NotFound'))} />
</Router>
),
root,
)