refactor(problems): improve testcase scroll layout using ScrollArea

This commit is contained in:
cfngc4594 2025-04-10 10:41:36 +08:00
parent c4e9c5b566
commit 2f2c8ab112

View File

@ -1,12 +1,17 @@
import TestcaseCard from "@/components/testcase-card";
import { ScrollArea } from "@/components/ui/scroll-area";
import { useProblemStore } from "@/providers/problem-store-provider";
export default function Testcase() {
const problem = useProblemStore((state) => state.problem);
return (
<div className="h-full rounded-b-3xl border border-t-0 border-muted bg-background">
<div className="relative h-full border border-t-0 border-muted rounded-b-3xl bg-background">
<div className="absolute h-full w-full">
<ScrollArea className="h-full">
<TestcaseCard testcases={problem.testcases} />
</ScrollArea>
</div>
</div>
);
}