import { ChevronDown, ChevronRight } from 'lucide-react'; import DiffViewer from '../../../DiffViewer.jsx'; import type { GitCommitSummary } from '../../types/types'; type DiffViewerProps = { diff: string; fileName: string; isMobile: boolean; wrapText: boolean; }; const DiffViewerComponent = DiffViewer as unknown as (props: DiffViewerProps) => JSX.Element; type CommitHistoryItemProps = { commit: GitCommitSummary; isExpanded: boolean; diff?: string; isMobile: boolean; wrapText: boolean; onToggle: () => void; }; export default function CommitHistoryItem({ commit, isExpanded, diff, isMobile, wrapText, onToggle, }: CommitHistoryItemProps) { return (
{isExpanded ? : }

{commit.message}

{commit.author} {' \u2022 '} {commit.date}

{commit.hash.substring(0, 7)}
{isExpanded && diff && (
{commit.stats}
)}
); }