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 <div>page not found</div>
  }
  return (
    <div class="px-4 py-8 mx-auto">
      <div class="max-w-screen-md mx-auto flex flex-col items-center justify-center">
      </div>
    </div>
  );
}
