From 9598430c9a7700dc4026137632c1bc4aa58e1eb1 Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sun, 6 Apr 2025 15:58:12 +0800 Subject: [PATCH] refactor(layout): use children prop instead of individual panel components --- src/app/(app)/problems/[id]/layout.tsx | 85 +------------------------- 1 file changed, 3 insertions(+), 82 deletions(-) diff --git a/src/app/(app)/problems/[id]/layout.tsx b/src/app/(app)/problems/[id]/layout.tsx index 63b418a..a348ce7 100644 --- a/src/app/(app)/problems/[id]/layout.tsx +++ b/src/app/(app)/problems/[id]/layout.tsx @@ -1,29 +1,16 @@ import prisma from "@/lib/prisma"; import { notFound } from "next/navigation"; -import DockView from "@/components/dockview"; import { ProblemStoreProvider } from "@/providers/problem-store-provider"; import { PlaygroundHeader } from "@/components/features/playground/header"; interface ProblemProps { params: Promise<{ id: string }>; - Description: React.ReactNode; - Solutions: React.ReactNode; - Submissions: React.ReactNode; - Code: React.ReactNode; - Testcase: React.ReactNode; - TestResult: React.ReactNode; - Bot: React.ReactNode; + children: React.ReactNode; } export default async function ProblemLayout({ params, - Description, - Solutions, - Submissions, - Code, - Testcase, - TestResult, - Bot, + children, }: ProblemProps) { const { id } = await params; @@ -54,73 +41,7 @@ export default async function ProblemLayout({ >
- + {children}