add LinkTree like links page
All checks were successful
/ image_build (push) Successful in 5m41s

This commit is contained in:
2026-09-25 11:15:40 -04:00
parent b094a72a4e
commit 1c78e959f6
13 changed files with 300 additions and 9 deletions

View File

@@ -3,11 +3,12 @@ import {useRouter} from "./RouterContext";
import {Path} from "./router";
type Route = [Path, string];
type Routes = [Route, Route, Route];
type Routes = [Route, Route, Route, Route];
export const ROUTES: Routes = [
["/", "Home"],
["/about", "About"],
["/articles", "Articles"]
["/articles", "Articles"],
["/links", "Links"]
];
function Route(props: PropsWithChildren & {route: Route}) {
@@ -23,9 +24,10 @@ function Route(props: PropsWithChildren & {route: Route}) {
const Canvas = React.lazy(() => import("../index/Canvas"));
const About = React.lazy(() => import("../about/AboutPage"));
const ArticlesList = React.lazy(() => import("../articles/ArticlesList"));
const LinkTree = React.lazy(() => import("../links/LinkTree"));
export function Routes() {
const [index, about, articles] = ROUTES;
const [index, about, articles, links] = ROUTES;
return <>
<Route route={index}>
@@ -37,5 +39,8 @@ export function Routes() {
<Route route={articles}>
<ArticlesList/>
</Route>
<Route route={links}>
<LinkTree/>
</Route>
</>
}