Open this example in the interactive library
Source code
// app/rental/page.tsx
export default function WeeklyRentalComparison() {
const equipment = [
{ id: "press", day: 40, deposit: 100, qty: 2 },
{ id: "lamp", day: 12, deposit: 25, qty: 8 },
{ id: "stand", day: 8, deposit: 10, qty: 5 },
];
return (
<table>
<caption>Five-day weekly rate versus seven single days</caption>
<tbody>
{equipment.map((e) => (
<tr key={e.id}>
<th>{e.id}</th>
<td>{e.day * 5}</td>
<td>{e.day * 7}</td>
</tr>
))}
</tbody>
</table>
);
}
