import { Component } from 'react'
import { DataGrid } from '@mui/x-data-grid'
import { Link, Typography, Box } from '@mui/material'
import Moment from 'react-moment'
export default class Table extends Component {
constructor ({ scanResults }) {
super()
this.scanResults = scanResults.map(row => ({
...row,
id: row._id
}))
this.columns = [
{
field: 'name',
headerName: 'Name',
flex: 2,
renderCell: (cellValues) => {
return (
{cellValues.row.fullName}
{cellValues.row.updatedAt}
)
}
},
{
field: 'partsPrice',
headerName: 'Parts Price',
flex: 1
},
{
field: 'setPrice',
headerName: 'Set Price',
flex: 1
},
{
field: 'difference',
headerName: 'Difference',
flex: 1
}
]
}
static getInitialProps () {
return {
props: { scanResults: [] }
}
}
render () {
return (
)
}
}