import { MDXRemote, MDXRemoteSerializeResult } from "next-mdx-remote"; import React, { ComponentType } from "react"; import { createLink, LinkProps, OrganizedContent, } from "@/components/OrganizedContent"; import { Header } from "./Header"; interface Section { id: string; title: string; } export interface Props { content: MDXRemoteSerializeResult; sections: Section[]; current: number; } export interface Options { title: string; pagePath: string; image: string; link?: ComponentType; } export function createSectionPage({ title, image, pagePath, link }: Options) { const Link = link ?? createLink(pagePath); return function Page(this: void, { content, sections, current }: Props) { return (
); }; }