diff --git a/src/app/(app)/problems/[id]/@problem/@description/layout.tsx b/src/app/(app)/problems/[id]/@problem/@description/layout.tsx index 76fb6e3..4a6dbad 100644 --- a/src/app/(app)/problems/[id]/@problem/@description/layout.tsx +++ b/src/app/(app)/problems/[id]/@problem/@description/layout.tsx @@ -1,5 +1,5 @@ -import ProblemDescriptionFooter from "@/features/playground/problem/description/footer"; import prisma from "@/lib/prisma"; +import ProblemDescriptionFooter from "@/features/playground/problem/description/footer"; interface ProblemDescriptionLayoutProps { params: Promise<{ id: string }>; diff --git a/src/app/(app)/problems/[id]/@problem/@description/page.tsx b/src/app/(app)/problems/[id]/@problem/@description/page.tsx index acc1f91..04e33b5 100644 --- a/src/app/(app)/problems/[id]/@problem/@description/page.tsx +++ b/src/app/(app)/problems/[id]/@problem/@description/page.tsx @@ -3,20 +3,20 @@ import { notFound } from "next/navigation"; import { MdxRenderer } from "@/components/content/mdx-renderer"; import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area"; -interface ProblemPageProps { +interface ProblemDescriptionPageProps { params: Promise<{ id: string }> } -export default async function ProblemPage({ +export default async function ProblemDescriptionPage({ params -}: ProblemPageProps) { +}: ProblemDescriptionPageProps) { const { id } = await params; const problem = await prisma.problem.findUnique({ where: { id: parseInt(id) }, - include: { - author: true, - }, + select: { + description: true, + } }); if (!problem) { diff --git a/src/app/(app)/problems/[id]/@problem/layout.tsx b/src/app/(app)/problems/[id]/@problem/layout.tsx index 78d658a..c691e09 100644 --- a/src/app/(app)/problems/[id]/@problem/layout.tsx +++ b/src/app/(app)/problems/[id]/@problem/layout.tsx @@ -47,10 +47,10 @@ export default function ProblemLayout({ {description} - + {solution} - + {submission}