import React from 'react'
import { Post } from 'types/payload-types'
import Blocks from './Blocks'
import Author from './Blocks/Author'

interface Props {
  post: Post
  locale: string
}

export default function PostPage(props: Props) {
  return (
    <article className="leading-relaxed">
      <Blocks blocks={props?.post.blocks} locale="" />
      {props?.post.author && typeof props?.post.author !== 'string' && (
        <Author author={props?.post.author} />
      )}
    </article>
  )
}
