feat(ui): sync BatchDiffApproval styling with BatchFilePermission (#4640)

This commit is contained in:
Sam Hoang Van 2025-06-13 20:01:47 +07:00 • committed by GitHub
parent 2cb02d6512
commit 9eb9fabee0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,22 +33,24 @@ export const BatchDiffApproval = memo(({ files = [], ts }: BatchDiffApprovalProp
return (
<div className="pt-[5px]">
{files.map((file) => {
// Combine all diffs into a single diff string for this file
const combinedDiff = file.diffs?.map((diff) => diff.content).join("\n\n") || file.content
<div className="flex flex-col gap-0 border border-border rounded-md p-1">
{files.map((file) => {
// Combine all diffs into a single diff string for this file
const combinedDiff = file.diffs?.map((diff) => diff.content).join("\n\n") || file.content
return (
<div key={`${file.path}-${ts}`} className="mb-2">
<CodeAccordian
path={file.path}
code={combinedDiff}
language="diff"
isExpanded={expandedFiles[file.path] || false}
onToggleExpand={() => handleToggleExpand(file.path)}
/>
</div>
)
})}
return (
<div key={`${file.path}-${ts}`}>
<CodeAccordian
path={file.path}
code={combinedDiff}
language="diff"
isExpanded={expandedFiles[file.path] || false}
onToggleExpand={() => handleToggleExpand(file.path)}
/>
</div>
)
})}
</div>
</div>
)
})