Skip to content

Commit

Permalink
feat(hawtio#125): Removed array creation: map handles it
Browse files Browse the repository at this point in the history
  • Loading branch information
joshiraez committed Apr 5, 2023
1 parent 0b54d61 commit e7fd303
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ export const AttributeTable: React.FunctionComponent = () => {

const labels = Object.keys(attributes[0])
const columns: TableProps['cells'] = labels.map(label => humanizeLabels(label))
const rows: TableProps['rows'] = attributes.map(attribute =>
[...labels].map(label => JSON.stringify(attribute[label])),
)
const rows: TableProps['rows'] = attributes.map(attribute => labels.map(label => JSON.stringify(attribute[label])))

return (
<Card isFullHeight>
Expand Down

0 comments on commit e7fd303

Please sign in to comment.