next.js/examples/cms-buttercms/components/blog/posts-list.js
posts-list.js25 lines667 B
import PostsPreview from "./post-preview";

export default function PostsList({ posts }) {
  return (
    <div className="col-12 col-lg-8 blog-roll-cards">
      <div className="row">
        {posts.map((post) => (
          <PostsPreview
            key={post.slug}
            title={post.title}
            coverImage={post.featuredImage}
            date={post.published}
            author={post.author}
            slug={post.slug}
            excerpt={post.summary}
            coverImageAlt={post.featuredImageAlt}
            tags={post.tags}
          />
        ))}
        {!posts.length && <div>No blog posts found.</div>}
      </div>
    </div>
  );
}
Quest for Codev2.0.0
/
SIGN IN