File size: 1,423 Bytes
930e4a4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | 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>
);
}
|