2025-03-24 02:33:14 +00:00
|
|
|
"use client";
|
|
|
|
|
|
|
|
import { useProblem } from "@/hooks/use-problem";
|
|
|
|
import MdxPreview from "@/components/mdx-preview";
|
2025-03-10 12:54:31 +00:00
|
|
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
2025-03-16 04:05:59 +00:00
|
|
|
import ProblemSolutionFooter from "@/components/features/playground/problem/solution/footer";
|
2025-03-10 12:54:31 +00:00
|
|
|
|
2025-03-24 02:33:14 +00:00
|
|
|
export default function ProblemSolutionPage() {
|
|
|
|
const { problem } = useProblem();
|
2025-03-10 12:54:31 +00:00
|
|
|
|
|
|
|
return (
|
2025-03-12 00:59:38 +00:00
|
|
|
<>
|
|
|
|
<div className="flex-1">
|
|
|
|
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-130px)]">
|
2025-03-24 02:33:14 +00:00
|
|
|
<MdxPreview source={problem.solution} />
|
2025-03-12 00:59:38 +00:00
|
|
|
<ScrollBar orientation="horizontal" />
|
|
|
|
</ScrollArea>
|
|
|
|
</div>
|
|
|
|
<ProblemSolutionFooter title={problem.title} />
|
|
|
|
</>
|
2025-03-10 12:54:31 +00:00
|
|
|
);
|
|
|
|
}
|