import type { FC, PropsWithChildren } from 'react'; import AvatarGroup from '@/components/Common/AvatarGroup'; import Preview from '@/components/Common/Preview'; import WithBlogCrossLinks from '@/components/withBlogCrossLinks'; import WithFooter from '@/components/withFooter'; import WithMetaBar from '@/components/withMetaBar'; import WithNavBar from '@/components/withNavBar'; import { useClientContext } from '@/hooks/react-server'; import ContentLayout from '@/layouts/Content'; import { mapAuthorToCardAuthors, mapBlogCategoryToPreviewType, } from '@/util/blogUtils'; import styles from './layouts.module.css'; const PostLayout: FC = ({ children }) => { const { frontmatter } = useClientContext(); const authors = mapAuthorToCardAuthors(frontmatter.author); const type = mapBlogCategoryToPreviewType(frontmatter.category); return ( <>

{frontmatter.title}

({ alt: author.fullName, src: author.src, }))} />

{authors.map(author => author.fullName).join(', ')}

{children}
); }; export default PostLayout;