gatsby-theme-try-ghost
Version:
A Gatsby theme for building flaring fast blogs from headless Ghost CMS.
22 lines (17 loc) • 562 B
JavaScript
import React from 'react'
import PropTypes from 'prop-types'
import { PostCard } from '.'
const PostItems = ({ posts, isHome, isAuthor }) => (
posts.map(({ node } , i) => (
// The tag below includes the markup for each post:
// components/common/PostCard.js
<PostCard key={node.id} post={node} num={i} isHome={isHome} isAuthor={isAuthor} />
))
)
PostItems.propTypes = {
posts: PropTypes.array.isRequired,
isHome: PropTypes.bool,
isAuthor: PropTypes.bool,
children: PropTypes.object,
}
export default PostItems