2022-11-24 02:12:37 +01:00
|
|
|
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"));
|
2022-11-22 02:23:14 +01:00
|
|
|
|
|
|
|
const App: Component = () => {
|
|
|
|
return (
|
2022-11-24 02:12:37 +01:00
|
|
|
<>
|
|
|
|
<Routes>
|
|
|
|
<Route path={["login", "register"]} component={Login} />
|
|
|
|
<Route path={["/", "*"]} component={Home} />
|
|
|
|
</Routes>
|
|
|
|
</>
|
2022-11-22 02:23:14 +01:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default App;
|