Fix Prisma 7 JSON proxy serialization in RSC props
Prisma 7 wraps Json fields in proxy objects that RSC cannot serialize. Fix: select specific columns (exclude content) in module page, and JSON.parse/stringify lesson content before passing to client. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -15,7 +15,10 @@ export default async function ModulePage({ params }: Props) {
|
||||
where: { id: moduleId },
|
||||
include: {
|
||||
course: { select: { title: true } },
|
||||
lessons: { orderBy: { order: "asc" } },
|
||||
lessons: {
|
||||
orderBy: { order: "asc" },
|
||||
select: { id: true, title: true, order: true, published: true, kinescopeId: true },
|
||||
},
|
||||
},
|
||||
}),
|
||||
prisma.module.findMany({
|
||||
|
||||
Reference in New Issue
Block a user