mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
feat(scroll-area): add horizontal scrollbar to problem description page
This commit is contained in:
parent
163dc4b57c
commit
dd2f4a733b
@ -1,7 +1,7 @@
|
|||||||
import prisma from "@/lib/prisma";
|
import prisma from "@/lib/prisma";
|
||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { MdxRenderer } from "@/components/content/mdx-renderer";
|
import { MdxRenderer } from "@/components/content/mdx-renderer";
|
||||||
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
|
|
||||||
interface ProblemPageProps {
|
interface ProblemPageProps {
|
||||||
params: Promise<{ id: string }>
|
params: Promise<{ id: string }>
|
||||||
@ -26,6 +26,7 @@ export default async function ProblemPage({
|
|||||||
return (
|
return (
|
||||||
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-130px)]">
|
<ScrollArea className="[&>[data-radix-scroll-area-viewport]]:max-h-[calc(100vh-130px)]">
|
||||||
<MdxRenderer source={problem.description} />
|
<MdxRenderer source={problem.description} />
|
||||||
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user