diff --git a/src/app/admin/courses/[courseId]/page.tsx b/src/app/admin/courses/[courseId]/page.tsx index a49474b..977eb50 100644 --- a/src/app/admin/courses/[courseId]/page.tsx +++ b/src/app/admin/courses/[courseId]/page.tsx @@ -50,13 +50,21 @@ export default async function CourseDetailPage({ params }: Props) { if (!course) notFound(); + // Prisma 7 returns proxy objects for relations/aggregates that RSC cannot serialize. + // Convert to plain JS before passing to Client Components. + const plain = JSON.parse(JSON.stringify({ course, allStudents, categories })) as { + course: typeof course; + allStudents: typeof allStudents; + categories: typeof categories; + }; + return (
{/* Breadcrumb */} {/* Course metadata */} @@ -64,7 +72,7 @@ export default async function CourseDetailPage({ params }: Props) {

Основная информация

- + {/* Modules */} @@ -74,19 +82,19 @@ export default async function CourseDetailPage({ params }: Props) { Модули

- {course.modules.length} модулей + {plain.course.modules.length} модулей
- + {/* Course tree overview */} - {course.modules.length > 0 && ( + {plain.course.modules.length > 0 && (

Структура курса

- +
)} @@ -97,9 +105,9 @@ export default async function CourseDetailPage({ params }: Props) {