BlogList fixed

This commit is contained in:
Antonello Zanini
2022-12-15 11:08:00 +01:00
parent e5f2483fa6
commit 0517c67193
2 changed files with 184 additions and 2 deletions

View File

@@ -15,7 +15,8 @@ function reformatDate(fullDate) {
const BlogList = ({ allBlogs }) => {
return (
<ul>
{allBlogs.length > 1 &&
{
allBlogs && allBlogs.length > 1 &&
allBlogs.map(post => (
<li key={post.slug}>
<Link href={{ pathname: `/blog/${post.slug}` }} className={styles.blog__link}>
@@ -34,7 +35,8 @@ const BlogList = ({ allBlogs }) => {
</div>
</Link>
</li>
))}
))
}
</ul>
)
}