mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 07:33:07 +08:00
refactor: display only non-featured posts in Recent Section
This commit is contained in:
+12
-10
@@ -92,16 +92,18 @@ const socialCount = SOCIALS.filter(social => social.active).length;
|
||||
<h2>Recent Posts</h2>
|
||||
<ul>
|
||||
{
|
||||
sortedPosts.map(
|
||||
({ data }, index) =>
|
||||
index < 4 && (
|
||||
<Card
|
||||
href={`/posts/${slugify(data)}`}
|
||||
frontmatter={data}
|
||||
secHeading={false}
|
||||
/>
|
||||
)
|
||||
)
|
||||
sortedPosts
|
||||
.filter(({ data }) => !data.featured)
|
||||
.map(
|
||||
({ data }, index) =>
|
||||
index < 4 && (
|
||||
<Card
|
||||
href={`/posts/${slugify(data)}`}
|
||||
frontmatter={data}
|
||||
secHeading={false}
|
||||
/>
|
||||
)
|
||||
)
|
||||
}
|
||||
</ul>
|
||||
<div class="all-posts-btn-wrapper">
|
||||
|
||||
Reference in New Issue
Block a user