Looking to adjust column widths based on the IDs received from the map function. Check out the code snippet:
<TableRow>
{
tableData.header.map(header => {
header.id === "name" ?
(<TableCell style={{width: 100}} align="center" key={header.id}>
{
header.title
}
</TableCell>)
:
(<TableCell style={{minWidth: 185}} align="center" key={header.id}>
{
header.title
}
</TableCell>)
})
}
</TableRow>
The error I'm encountering points to this line:
header.id === "name" ?
The specific error message reads: "Expected an assignment or function call and instead saw an expression no-unused-expressions"
Need some help pinpointing the issue here.
I've attempted adding 'return' before TableCell in both scenarios, but it triggers an error.