This commit is contained in:
@@ -315,23 +315,23 @@ function DiffViewer({ diff }: { diff: string }) {
|
||||
const section = sectionRefs.current[file.id];
|
||||
if (!scroller || !section) return;
|
||||
scroller.scrollTo({
|
||||
top: section.offsetTop - scroller.offsetTop - 12,
|
||||
top: Math.max(section.offsetTop - 12, 0),
|
||||
behavior: 'smooth'
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="grid max-h-[56vh] overflow-hidden rounded-md border border-border bg-[#080b10] text-xs leading-5 lg:grid-cols-[280px_minmax(0,1fr)]">
|
||||
<aside className="border-b border-slate-700/80 bg-[#0b0f14] lg:border-b-0 lg:border-r">
|
||||
<div className="grid h-[56vh] min-h-0 overflow-hidden rounded-md border border-border bg-[#080b10] text-xs leading-5 lg:grid-cols-[280px_minmax(0,1fr)]">
|
||||
<aside className="min-h-0 border-b border-slate-700/80 bg-[#0b0f14] lg:border-b-0 lg:border-r">
|
||||
<div className="border-b border-slate-700/80 bg-[#111827] px-3 py-2">
|
||||
<p className="text-[12px] font-semibold text-slate-100">변경 파일</p>
|
||||
<p className="mt-0.5 text-[11px] text-slate-400">총 {files.length}개</p>
|
||||
</div>
|
||||
<div className="max-h-44 overflow-y-auto p-2 lg:max-h-[calc(56vh-50px)]">
|
||||
<div className="h-44 overflow-y-auto p-2 lg:h-[calc(56vh-50px)]">
|
||||
<DiffTree nodes={tree} onSelect={scrollToFile} />
|
||||
</div>
|
||||
</aside>
|
||||
<div ref={scrollerRef} className="min-w-0 overflow-auto p-3 font-mono">
|
||||
<div ref={scrollerRef} className="min-h-0 min-w-0 overflow-auto p-3 font-mono">
|
||||
<div className="space-y-4">
|
||||
{files.map((file) => (
|
||||
<section
|
||||
|
||||
Reference in New Issue
Block a user