fix: fetch 13 articles so Latest grid shows 12 after hero filter; hide Load More when all articles already loaded

This commit is contained in:
achmad
2026-05-31 16:46:31 +07:00
parent 75d4da380e
commit 4befb572a3
3 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -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
}