mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 07:16:34 +00:00
refactor(problems): improve testcase scroll layout using ScrollArea
This commit is contained in:
parent
c4e9c5b566
commit
2f2c8ab112
@ -1,12 +1,17 @@
|
|||||||
import TestcaseCard from "@/components/testcase-card";
|
import TestcaseCard from "@/components/testcase-card";
|
||||||
|
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||||
import { useProblemStore } from "@/providers/problem-store-provider";
|
import { useProblemStore } from "@/providers/problem-store-provider";
|
||||||
|
|
||||||
export default function Testcase() {
|
export default function Testcase() {
|
||||||
const problem = useProblemStore((state) => state.problem);
|
const problem = useProblemStore((state) => state.problem);
|
||||||
|
|
||||||
return (
|
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">
|
||||||
<TestcaseCard testcases={problem.testcases} />
|
<div className="absolute h-full w-full">
|
||||||
|
<ScrollArea className="h-full">
|
||||||
|
<TestcaseCard testcases={problem.testcases} />
|
||||||
|
</ScrollArea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user