Skip to content

Commit 0126566

Browse files
committed
feat: support full post list in 'Latest' tab with load more + text update
1 parent b3bf66a commit 0126566

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pages/post.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export const getStaticProps: GetStaticProps<Props> = async () => {
2626
const postsByTag: Record<string, Post[]> = {};
2727
const tagCounts: Record<string, number> = {};
2828

29-
postsByTag['latest'] = posts.slice(0, 10);
30-
tagCounts['latest'] = postsByTag['latest'].length;
29+
postsByTag['latest'] = posts;
30+
tagCounts['latest'] = posts.length;
3131

3232
posts.forEach((post) => {
3333
(post.tags || []).forEach((tag) => {
@@ -59,7 +59,7 @@ export default function PostPage({ postsByTag, tagCounts }: Props) {
5959
: `${selectedTag.charAt(0).toUpperCase() + selectedTag.slice(1)} Posts`;
6060

6161
const description = selectedTag === "latest"
62-
? "Showing the 10 most recent posts. You can filter by tag."
62+
? "Check out the latest posts — and filter by tag if you'd like."
6363
: `Posts related to the '${selectedTag}' category.`;
6464

6565
const gradientOptions = [

0 commit comments

Comments
 (0)