|
|
@ -31,7 +31,9 @@ export default function Items({items: _items}){
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<h2>Items</h2>
|
|
|
|
<h2>Items</h2>
|
|
|
|
<Link href="/admin/items/new"><a>Create New Item</a></Link>
|
|
|
|
<p>
|
|
|
|
|
|
|
|
<Link href="/admin/items/new"><a>Create New Item</a></Link>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
<Table
|
|
|
|
<Table
|
|
|
|
columns={[
|
|
|
|
columns={[
|
|
|
|
{name: 'Name', extractor: item => item.name},
|
|
|
|
{name: 'Name', extractor: item => item.name},
|
|
|
@ -50,7 +52,8 @@ export default function Items({items: _items}){
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
)}
|
|
|
|
)}
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
rows={items}
|
|
|
|
// Map in an id property so the table can use array.map
|
|
|
|
|
|
|
|
rows={items.map(item => ({id: item.uuid, ...item}))}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</>
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
)
|
|
|
|