monaco-editor-lsp-next/src/app/(app)/problems/[id]/@problem/@solution/page.tsx
cfngc4594 fbe0ef63d8
Some checks failed
Build & Push Judge4c Docker Image / build-and-push-judge4c-docker-image (., Dockerfile, judge4c) (push) Failing after 0s
refactor(playground): simplify chat layout and unify scroll area styles
2025-03-26 22:57:16 +08:00

23 lines
836 B
TypeScript

"use client";
import { useProblem } from "@/hooks/use-problem";
import MdxPreview from "@/components/mdx-preview";
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
import ProblemSolutionFooter from "@/components/features/playground/problem/solution/footer";
export default function ProblemSolutionPage() {
const { problem } = useProblem();
return (
<>
<div className="flex-1">
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-130px)] [&>[data-radix-scroll-area-viewport]>div:min-w-0 [&>[data-radix-scroll-area-viewport]>div]:!block">
<MdxPreview source={problem.solution} className="p-4 md:p-6" />
<ScrollBar orientation="horizontal" />
</ScrollArea>
</div>
<ProblemSolutionFooter title={problem.title} />
</>
);
}