Sadum1's picture
Upload folder using huggingface_hub
930e4a4 verified
Raw History Blame Contribute Delete
1.42 kB
import type { ExtractionRecordEntry, SearchResultItem } from "../types";
interface EvidenceTableProps {
extractions: ExtractionRecordEntry[];
papersById: Map<string, SearchResultItem>;
}
export function EvidenceTable({ extractions, papersById }: EvidenceTableProps) {
if (extractions.length === 0) {
return (
<p className="empty-state">
No studies have been included and extracted yet β€” complete Phase 3
screening and extraction first.
</p>
);
}
return (
<div className="evidence-table-wrap">
<table className="evidence-table">
<thead>
<tr>
<th>Study</th>
<th>Species</th>
<th>Route</th>
<th>Duration</th>
<th>NOAEL</th>
<th>LOAEL</th>
<th>Effect / finding</th>
</tr>
</thead>
<tbody>
{extractions.map((e) => (
<tr key={e.id}>
<td className="evidence-study-cell">
{papersById.get(e.paper_id)?.title ?? e.paper_id}
</td>
<td>{e.species ?? "β€”"}</td>
<td>{e.route ?? "β€”"}</td>
<td>{e.duration ?? "β€”"}</td>
<td>{e.noael ?? "β€”"}</td>
<td>{e.loael ?? "β€”"}</td>
<td>{e.effect_finding ?? "β€”"}</td>
</tr>
))}
</tbody>
</table>
</div>
);
}