Split table into component

This commit is contained in:
2022-03-13 16:19:52 +03:00
parent 9e216f821f
commit 648af4f060
8 changed files with 108 additions and 50 deletions

25
app/pages/home/Table.js Normal file
View File

@@ -0,0 +1,25 @@
import React from "react"
import ItemRow from './ItemRow'
export default class Table extends React.Component {
constructor ({ scanResults }) {
super()
this.scanResults = scanResults
}
render () {
return (
<table>
<thead></thead>
<tbody>
{this.scanResults.map((scanResult) =>
<ItemRow
key={scanResult._id}
scanResult={scanResult}
/>
)}
</tbody>
</table>
)
}
}