import { MDXLayoutRenderer } from '@/components/MDXComponents' import { getFileBySlug } from '@/lib/mdx' import { GetStaticProps, InferGetStaticPropsType } from 'next' import { AuthorFrontMatter } from 'types/AuthorFrontMatter' const DEFAULT_LAYOUT = 'AuthorLayout' // @ts-ignore export const getStaticProps: GetStaticProps<{ authorDetails: { mdxSource: string; frontMatter: AuthorFrontMatter } }> = async () => { const authorDetails = await getFileBySlug('authors', ['default']) const { mdxSource, frontMatter } = authorDetails return { props: { authorDetails: { mdxSource, frontMatter } } } } export default function About({ authorDetails }: InferGetStaticPropsType) { const { mdxSource, frontMatter } = authorDetails return ( ) }