You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
584 B

import { Route, Routes } from '@solidjs/router';
import { Component, lazy } from 'solid-js';
// Only load the components if we are navigating to them
const Home = lazy(() => import('./pages/Home'));
const Login = lazy(() => import('./pages/Login'));
const Test = lazy(() => import('./pages/Test'));
const App: Component = () => {
return (
<>
<Routes>
<Route path={'test'} component={Test} />
<Route path={['login', 'register']} component={Login} />
<Route path={['/', '*']} component={Home} />
</Routes>
</>
);
};
export default App;