import {useContext} from "preact/hooks"; import { ConfigContext } from "#/routes/_app.tsx"; import type { PageProps } from "$fresh/server.ts"; export default function SubPage(props: PageProps) { const config = useContext(ConfigContext); const page = config.pages?.find((page) => page.title === props.params.page); if(!page) { return
page not found
} return (
); }