Skip to content

Commit

Permalink
Fix: Don't show 0 affixes stats
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Sep 29, 2024
1 parent eac4297 commit 0aa3525
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/components/sections/results/AffixesStats.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ const AffixesStats = ({ data, title }) => {
<Typography variant="h6">{title}</Typography>
<Table padding="none">
<TableBody>
{Object.keys(data).map((attribute) => (
<TableRow hover key={attribute}>
<TableCell>
<Attribute name={attribute} style={{ fontSize: '20px', color: '#AAAAAA' }} />
</TableCell>
<TableCell align="right">{data[attribute]}</TableCell>
</TableRow>
))}
{Object.entries(data)
.filter(([_, value]) => value)
.map(([attribute, value]) => (
<TableRow hover key={attribute}>
<TableCell>
<Attribute name={attribute} style={{ fontSize: '20px', color: '#AAAAAA' }} />
</TableCell>
<TableCell align="right">{value}</TableCell>
</TableRow>
))}
</TableBody>
</Table>
</>
Expand Down

0 comments on commit 0aa3525

Please sign in to comment.