Skip to content

Commit

Permalink
feat(ui): hide year when posts area separated by year
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfg7 committed May 10, 2023
1 parent f63a6a3 commit e49aa24
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/components/KnowledgeList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ export function KnowledgeList({ posts, separateByYear = false }: Props) {
</h1>
<div className="flex flex-col gap-3">
{postsOfYear.posts.map((post, key) => (
<KnowledgeLink
key={key}
id={post.id}
title={post.title}
date={post.date}
description={post.description}
/>
<KnowledgeLink key={key} post={post} hideYear />
))}
</div>
</div>
Expand All @@ -37,13 +31,7 @@ export function KnowledgeList({ posts, separateByYear = false }: Props) {
return (
<div className="flex flex-col gap-5">
{posts.map((post, key) => (
<KnowledgeLink
key={key}
id={post.id}
title={post.title}
date={post.date}
description={post.description}
/>
<KnowledgeLink key={key} post={post} />
))}
</div>
)
Expand Down

0 comments on commit e49aa24

Please sign in to comment.