From 4c120388abdd78b2590431e0072a7d14b0c8b71f Mon Sep 17 00:00:00 2001 From: cfngc4594 Date: Sun, 6 Apr 2025 17:34:07 +0800 Subject: [PATCH] feat(problem): add ProblemPage with DockView layout --- src/app/(app)/problems/[id]/page.tsx | 72 ++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/app/(app)/problems/[id]/page.tsx diff --git a/src/app/(app)/problems/[id]/page.tsx b/src/app/(app)/problems/[id]/page.tsx new file mode 100644 index 0000000..43fc20c --- /dev/null +++ b/src/app/(app)/problems/[id]/page.tsx @@ -0,0 +1,72 @@ +"use client"; + +import { + Bot, + Code, + Description, + Solutions, + Submissions, + Testcase, + TestResult, +} from "@/app/(app)/problems/[id]/features"; +import DockView from "@/components/dockview"; + +export default function ProblemPage() { + return ( + , + Solutions: () => , + Submissions: () => , + Code: () => , + Testcase: () => , + TestResult: () => , + Bot: () => , + }} + options={[ + { + id: "Description", + component: "Description", + title: "Description", + }, + { + id: "Solutions", + component: "Solutions", + title: "Solutions", + position: { referencePanel: "Description", direction: "within" }, + }, + { + id: "Submissions", + component: "Submissions", + title: "Submissions", + position: { referencePanel: "Solutions", direction: "within" }, + }, + { + id: "Code", + component: "Code", + title: "Code", + position: { referencePanel: "Submissions", direction: "right" }, + }, + { + id: "Bot", + component: "Bot", + title: "Bot", + position: { referencePanel: "Code", direction: "right" }, + }, + { + id: "Testcase", + component: "Testcase", + title: "Testcase", + position: { referencePanel: "Code", direction: "below" }, + }, + { + id: "TestResult", + component: "TestResult", + title: "Test Result", + position: { referencePanel: "Testcase", direction: "within" }, + }, + ]} + /> + ); +}