diff --git a/app/dashboard/categories/page.tsx b/app/dashboard/categories/page.tsx index 25e908d..1750618 100644 --- a/app/dashboard/categories/page.tsx +++ b/app/dashboard/categories/page.tsx @@ -110,9 +110,16 @@ export default async function CategoriesPage() { // Compter les tutoriels par catégorie const counts = await prisma.tutorial.groupBy({ by: ["categoryId"], - _count: true, + _count: { + _all: true, + }, }); - const countMap = new Map(counts.map((c) => [c.categoryId, c._count])); + const countMap = new Map( + counts.map((c: (typeof counts)[number]) => [ + c.categoryId, + c._count._all, + ]) + ); return (