import { getGlobalData } from '../../utils/global-data'; import { getNextPostBySlug, getPostBySlug, getPreviousPostBySlug, getPostFilePaths, } from '../../utils/mdx-utils'; import { MDXRemote } from 'next-mdx-remote'; import Head from 'next/head'; import Link from 'next/link'; import ArrowIcon from '../../components/ArrowIcon'; import CustomImage from '../../components/CustomImage'; import CustomLink from '../../components/CustomLink'; import Footer from '../../components/Footer'; import Header from '../../components/Header'; import Layout, { GradientBackground } from '../../components/Layout'; import SEO from '../../components/SEO'; // Custom components/renderers to pass to MDX. // Since the MDX files aren't loaded by webpack, they have no knowledge of how // to handle import statements. Instead, you must include components in scope // here. const components = { a: CustomLink, // It also works with dynamically-imported components, which is especially // useful for conditionally loading components for certain routes. // See the notes in README.md for more details. Head, img: CustomImage, }; export default function PostPage({ source, frontMatter, prevPost, nextPost, globalData, }) { return (

{frontMatter.title}

{frontMatter.description && (

{frontMatter.description}

)}
{prevPost && (

Previous

{prevPost.title}

)} {nextPost && (

Next

{nextPost.title}

)}