text: import React from "react";
  import { Link, graphql } from "gatsby";
  import Layout from "../components/layout";
  import SEO from "../components/seo";
  const BlogPost = ({ data }) => {
      const { title, body, images, tags } = data.contentfulLusciousBjjBlog;
      return (
          <Layout>
              <SEO title={title} />
              <div className="blogpost">
                  <h1>{title}</h1>
                  <img alt={title} src={images.file.url} />
                  <div className="tags">
                      {tags.map(tags => (
                          <span className="tag" key={tags}>
                {tags}
              </span>
                      ))}
                  </div>
                  <p className="body-text">{body.body}</p>
                  <Link to="/blogposts">View more posts</Link>
                  <Link to="/">Back to Home</Link>
              </div>
          </Layout>
      );
  };
  export default BlogPost;
  export const pageQuery = graphql`
    query($slug: String!) {
      contentfulLusciousBjjBlog(slug: { eq: $slug }) {
        title
        slug
        body {
          body
        }
        images {
          file {
            url
          }
        }
        tags
      }
    }
  `;