import React from 'react' import { Link } from 'gatsby' import Hero from './hero' import Meta from './meta' import { Spacer } from '@styles/utils' import { PostSummary as PostSummaryStyled, H2, ContinueReading } from '@styles/post-summary' import { Mdx } from '../types/graphql-types' interface Props { post: Mdx } export default function PostSummary({ post }: Props) { if (!post || !post.fields || !post.fields.url) return null const hero = post?.frontmatter?.banner?.childImageSharp?.fluid return (

{post.fields.title}

{hero && post.fields.url && post.fields.title && ( <> )} {post.timeToRead != null && ( <> )} {post.excerpt} Continue Reading
) }