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;
