diff --git a/app/[category]/page.tsx b/app/[category]/page.tsx
index ff81705..93e0e3e 100644
--- a/app/[category]/page.tsx
+++ b/app/[category]/page.tsx
@@ -68,7 +68,7 @@ export default async function CategoryPage({ params }: Props) {
))}
-
+ = 24} />
>
)}
diff --git a/app/page.tsx b/app/page.tsx
index f81d55e..83f15cc 100644
--- a/app/page.tsx
+++ b/app/page.tsx
@@ -11,12 +11,12 @@ export default async function HomePage() {
try {
const [settings, articles] = await Promise.all([
getSiteSettings(),
- getArticles({ limit: 12 }),
+ getArticles({ limit: 13 }),
])
heroArticle = settings.hero_article
latestArticles = settings.hero_article
? articles.filter((a) => a.id !== settings.hero_article!.id)
- : articles
+ : articles.slice(0, 12)
} catch {
// Directus not available yet
}
diff --git a/components/article/LoadMoreButton.tsx b/components/article/LoadMoreButton.tsx
index 70bbb17..6fc6495 100644
--- a/components/article/LoadMoreButton.tsx
+++ b/components/article/LoadMoreButton.tsx
@@ -7,13 +7,14 @@ import ArticleCard from './ArticleCard'
interface Props {
categorySlug: string
initialCount: number
+ hasMore?: boolean
}
-export default function LoadMoreButton({ categorySlug, initialCount }: Props) {
+export default function LoadMoreButton({ categorySlug, initialCount, hasMore: initialHasMore = true }: Props) {
const [articles, setArticles] = useState([])
const [offset, setOffset] = useState(initialCount)
const [loading, setLoading] = useState(false)
- const [hasMore, setHasMore] = useState(true)
+ const [hasMore, setHasMore] = useState(initialHasMore)
async function loadMore() {
setLoading(true)