import { useCommitDetails } from '@/api/git' import { Loader2, GitCommit, ArrowLeft } from 'lucide-react' import { Button } from '@/components/ui/button' import { GitFlatFileList } from './GitFlatFileList' import { FileDiffView } from '@/components/file-browser/FileDiffView' interface CommitDetailViewProps { repoId: number commitHash: string onBack: () => void onFileSelect: (path: string) => void selectedFile?: string } export function CommitDetailView({ repoId, commitHash, onBack, onFileSelect, selectedFile }: CommitDetailViewProps) { const { data: commit, isLoading, error } = useCommitDetails(repoId, commitHash) if (isLoading) { return (
Failed to load commit details
{error?.message}
{commit.message}