doorgan/routes/index.tsx

18 lines
480 B
TypeScript
Raw Permalink Normal View History

2024-10-21 02:48:23 +00:00
import { container } from "#/lib/container.ts";
import { ConfigLoader } from "#/lib/config/index.ts";
import MagicPage from "#/islands/MagicPage.tsx";
export default function HomePage() {
const configLoader = container.get(ConfigLoader);
const config = configLoader.config()
let page = config.pages?.find((page) => page.name === undefined || page.name === "index");
if(page === undefined) {
page = {
}
}
return <MagicPage config={config} page={page} />;
}