fix: category filter by UUID and remove nav_categories from site_settings query

This commit is contained in:
achmad
2026-05-28 23:15:53 +07:00
parent bb0b2ac961
commit c4ed4a3615
3 changed files with 12 additions and 9 deletions
+2 -4
View File
@@ -40,10 +40,8 @@ export default async function CategoryPage({ params }: Props) {
let articles: import('@/lib/types').Article[] = []
try {
const [cat, arts] = await Promise.all([
getCategoryBySlug(categorySlug),
getArticles({ categorySlug, limit: 24 }),
])
const cat = await getCategoryBySlug(categorySlug)
const arts = cat ? await getArticles({ categoryId: cat.id, limit: 24 }) : []
category = cat
articles = arts
} catch {