19 lines
486 B
TypeScript
Raw Normal View History

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 App: Component = () => {
return (
<>
<Routes>
<Route path={["login", "register"]} component={Login} />
<Route path={["/", "*"]} component={Home} />
</Routes>
</>
);
};
export default App;