text: import { Link, routes } from '@redwoodjs/router'
  import BlogPost from 'src/components/BlogPost'
  
  export const QUERY = gql`
    query BlogPostsQuery {
      posts {
        id
        title
        author
        body
        createdAt
      }
    }
  `
  
  export const Loading = () => <div>Loading...</div>
  
  export const Empty = () => <div>Empty</div>
  
  export const Failure = ({ error }) => <div>Error: {error.message}</div>
  
  export const Success = ({ posts }) => {
    return (
      <div className="-mt-10">
        {posts.map((post) => (
          <div key={post.id} className="mt-10">
            <BlogPost post={post} />
          </div>
        ))}
      </div>
    )
  }
  