)}
{!loadingCommits && !commitsError && commits.length === 0 && (
)}
{!loadingCommits && !commitsError && commits.length > 0 && (
{commits.map((commit, index) => {
const isSelected = selectedCommitHashes.has(commit.hash);
const isExpanded = expandedCommits.has(commit.hash);
const hasFiles = commit.files && commit.files.length > 0;
return (
toggleCommitSelection(commit.hash)}
className={cn(
'flex gap-3 py-2.5 px-3 cursor-pointer rounded-md transition-colors',
!isSelected && 'hover:bg-muted/50'
)}
>
{/* Checkbox */}
toggleCommitSelection(commit.hash)}
onClick={(e) => e.stopPropagation()}
className="mt-0.5"
/>
{/* Commit content */}
{commit.body && (
{commit.body}
)}
{commit.author}
{hasFiles && (
)}
{/* Expanded file list */}
{isExpanded && hasFiles && (
{commit.files.map((file) => (
{file}
))}
)}
);
})}
{/* Load More button */}
{hasMoreCommits && commitLimit < 100 && (
)}