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