text: import React from "react";
  import PropTypes from "prop-types";
  import { Helmet } from "react-helmet";
  import { graphql, Link } from "gatsby";
  import Layout from "../components/Layout";
  import Content, { HTMLContent } from "../components/Content";
  import { FaArrowLeft } from "react-icons/fa";
  
  export const FaqPostTemplate = ({ content, contentComponent, description, title, helmet }) => {
    const PostContent = contentComponent || Content;
  
    return (
      <section className="faq-post-section">
        {helmet || ""}
        <div className="container content">
          <div className="columns">
            <div className="column is-10 is-offset-1">
              <h1 className="title is-size-2 has-text-weight-bold is-bold-light">{title}</h1>
              <p>{description}</p>
              <PostContent content={content} />
              <Link to="/faq" className="btn btn-primary btn-lg">
                <FaArrowLeft /> Back to Blogs
              </Link>
            </div>
          </div>
        </div>
      </section>
    );
  };
  
  FaqPostTemplate.propTypes = {
    content: PropTypes.node.isRequired,
    contentComponent: PropTypes.func,
    description: PropTypes.string,
    title: PropTypes.string,
    helmet: PropTypes.object,
  };
  
  const FaqPost = ({ data }) => {
    const { markdownRemark: post } = data;
  
    return (
      <Layout>
        <FaqPostTemplate
          content={post.html}
          contentComponent={HTMLContent}
          description={post.frontmatter.description}
          helmet={
            <Helmet titleTemplate="%s | Blog">
              <title>{`${post.frontmatter.title}`}</title>
              <meta name="description" content={`${post.frontmatter.description}`} />
            </Helmet>
          }
          tags={post.frontmatter.tags}
          title={post.frontmatter.title}
        />
      </Layout>
    );
  };
  
  FaqPost.propTypes = {
    data: PropTypes.shape({
      markdownRemark: PropTypes.object,
    }),
  };
  
  export default FaqPost;
  
  export const pageQuery = graphql`
    query FaqPostByID($id: String!) {
      markdownRemark(id: { eq: $id }) {
        id
        html
        frontmatter {
          date(formatString: "MMMM DD, YYYY")
          title
          description
        }
      }
    }
  `;
  