import { deleteDocument } from '../services/api'; export default function DocumentList({ documents, onDocumentDeleted, isLoading }) { const handleDelete = async (docId, filename) => { if (!confirm(`Delete "${filename}" and all its data?`)) return; try { await deleteDocument(docId); onDocumentDeleted?.(docId); } catch (err) { alert(`Failed to delete: ${err.message}`); } }; if (isLoading) { return (
No documents yet
Upload a PDF to get started