import type { ReactNode } from "react";

const BlogPost = ({
  post,
  children,
}: {
  post: any;
  children: ReactNode;
}) => {
  const { title, image } = post.data;

  return (
    <section className="blog-post-shell">
      <article className="blog-article">
        {image ? (
          <figure className="blog-post-hero-image">
            <img src={image} alt={title} />
          </figure>
        ) : null}

        <div className="article-content">{children}</div>
      </article>
    </section>
  );
};

export { BlogPost };
