monaco-editor-lsp-next/src/features/problems/detail/components/panel.tsx
cfngc4594 b34acf37b9 feat(panel-layout): add scrollable content support with isScroll prop
- Add ScrollArea and ScrollBar components from ui/scroll-area
- Introduce optional isScroll prop (defaults to true) to control scrolling
- Maintain backward compatibility with existing usage
2025-06-21 13:26:27 +08:00

27 lines
716 B
TypeScript

import { Suspense } from "react";
import {
DetailContent,
DetailContentSkeleton,
} from "@/features/problems/detail/components/content";
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
import { DetailHeader } from "@/features/problems/detail/components/header";
interface DetailPanelProps {
submissionId: string | undefined;
}
export const DetailPanel = ({ submissionId }: DetailPanelProps) => {
if (!submissionId) {
return <DetailContentSkeleton />;
}
return (
<PanelLayout isScroll={false}>
<DetailHeader />
<Suspense fallback={<DetailContentSkeleton />}>
<DetailContent submissionId={submissionId} />
</Suspense>
</PanelLayout>
);
};