import { PropsWithChildren } from "react"; import Base from "../pages/LayoutBase"; interface BlogProps { title: string; description: string; published: string; updated?: string; } export default function Layout({ title, description, published, updated, }: BlogProps): React.FC { const header = (

{title}

{description}

Published: {published}

{updated &&

Last updated: {updated}

}
); const withChildren: React.FC = ({ children }) => ( {header}
{children} ); return withChildren; }