mirror of
https://github.com/maciejpedzich/maciejpedzi.ch.git
synced 2024-11-27 23:55:47 +01:00
Ensure "no posts" message doesn't get placed in ul
This commit is contained in:
parent
6a35c00298
commit
d5a7b418a3
@ -16,16 +16,22 @@ const posts = (
|
|||||||
).sort((a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf());
|
).sort((a, b) => a.data.pubDate.valueOf() - b.data.pubDate.valueOf());
|
||||||
---
|
---
|
||||||
|
|
||||||
<ul class="post-list">
|
{
|
||||||
{
|
posts.length === 0 ? (
|
||||||
posts.length === 0 ? (
|
<p id="no-posts-found">No posts were found...</p>
|
||||||
<p>No posts were found</p>
|
) : (
|
||||||
) : (
|
<ul class="post-list">
|
||||||
posts.map((post) => (
|
{posts.map((post) => (
|
||||||
<li>
|
<li>
|
||||||
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
|
<a href={`/blog/${post.slug}`}>{post.data.title}</a>
|
||||||
</li>
|
</li>
|
||||||
))
|
))}
|
||||||
)
|
</ul>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#no-posts-found {
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
</ul>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user