import { PropsWithChildren } from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCalendar } from "@fortawesome/free-solid-svg-icons"; 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}

{updated &&

Last updated: {updated}

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