doorgan/routes/index.tsx

18 lines
480 B
TypeScript

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} />;
}