commerce/components/tests/tests-table.tsx
Timur Suleymanov d827e1232b Add my code
2024-06-04 16:01:21 +05:00

32 lines
727 B
TypeScript

import Link from 'next/link';
import CartButton from './cart-button';
export default function TestsTable({ products = [] }) {
return (
<div>
<table>
<thead>
<tr>
<th>Number</th>
<th>Name</th>
<th>Specimen</th>
</tr>
</thead>
<tbody>
{products.map((product) => (
<tr key={product.id}>
<td>{product.id}</td>
<td>
<Link href={`/tests/${product.id}`}>{product.attributes.name}</Link>
</td>
<td>
<CartButton id={product.id} />
</td>
</tr>
))}
</tbody>
</table>
</div>
);
}