This commit is contained in:
Karol Wypchlo 2021-02-15 11:24:07 +01:00
parent 01d4001c70
commit 865208a418
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ export default function Table({ items, count, headers, actions, offset, setOffse
<th <th
key={key} key={key}
scope="col" scope="col"
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider" className="px-6 py-3 whitespace-nowrap text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
> >
{name} {name}
</th> </th>
@ -60,7 +60,7 @@ export default function Table({ items, count, headers, actions, offset, setOffse
{items.map((row, index) => ( {items.map((row, index) => (
<tr className={index % 2 ? "bg-white" : "bg-gray-50"} key={index}> <tr className={index % 2 ? "bg-white" : "bg-gray-50"} key={index}>
{headers.map(({ key, formatter }) => ( {headers.map(({ key, formatter }) => (
<td key={key} className="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"> <td key={key} className="px-6 py-4 text-sm font-medium text-gray-900">
{(formatter ? formatter(row[key]) : row[key]) || <>&mdash;</>} {(formatter ? formatter(row[key]) : row[key]) || <>&mdash;</>}
</td> </td>
))} ))}