Split table into component
This commit is contained in:
25
app/pages/home/Table.js
Normal file
25
app/pages/home/Table.js
Normal 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>
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user