fix: category filter by UUID and remove nav_categories from site_settings query
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user