Limit blog posts on index page and key list fix
This commit is contained in:
@@ -149,9 +149,8 @@ const IndexPage = ({ ...props }) => (
|
|||||||
/>
|
/>
|
||||||
<div className="lg:flex justify-center mt-8">
|
<div className="lg:flex justify-center mt-8">
|
||||||
{props.data.allWordpressPost.edges.map(({ node }) => (
|
{props.data.allWordpressPost.edges.map(({ node }) => (
|
||||||
<div className="md:w-1/2 p-2">
|
<div key={node.id} className="md:w-1/2 p-2">
|
||||||
<Card
|
<Card
|
||||||
key={node.id}
|
|
||||||
url={`blog/${node.slug}`}
|
url={`blog/${node.slug}`}
|
||||||
title={node.title}
|
title={node.title}
|
||||||
date={node.date}
|
date={node.date}
|
||||||
@@ -177,7 +176,7 @@ const IndexPage = ({ ...props }) => (
|
|||||||
|
|
||||||
export const query = graphql`
|
export const query = graphql`
|
||||||
query indexPostsQuery {
|
query indexPostsQuery {
|
||||||
allWordpressPost {
|
allWordpressPost(limit: 2) {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
id
|
id
|
||||||
|
|||||||
Reference in New Issue
Block a user