Fix DOM parse warnings

This commit is contained in:
nickofolas 2022-04-09 09:06:32 -05:00
parent 48895c8d2d
commit 4a0998c568
2 changed files with 7 additions and 3 deletions

@ -236,7 +236,7 @@ export function CharacterStats(): React.ReactElement {
</IconButton> </IconButton>
</> </>
</StatsRow> </StatsRow>
{player.companyName && ( {player.companyName ? (
<> <>
<StatsRow <StatsRow
name="Last Employer" name="Last Employer"
@ -249,8 +249,10 @@ export function CharacterStats(): React.ReactElement {
data={{ content: player.jobs[player.companyName] }} data={{ content: player.jobs[player.companyName] }}
/> />
</> </>
) : (
<></>
)} )}
{player.jobs && Object.keys(player.jobs).length !== 0 && ( {player.jobs && Object.keys(player.jobs).length !== 0 ? (
<StatsRow name="All Employers" color={Settings.theme.primary} data={{}}> <StatsRow name="All Employers" color={Settings.theme.primary} data={{}}>
<> <>
<span style={{ color: Settings.theme.primary }}>{Object.keys(player.jobs).length} total</span> <span style={{ color: Settings.theme.primary }}>{Object.keys(player.jobs).length} total</span>
@ -259,6 +261,8 @@ export function CharacterStats(): React.ReactElement {
</IconButton> </IconButton>
</> </>
</StatsRow> </StatsRow>
) : (
<></>
)} )}
<StatsRow <StatsRow
name="Servers Owned" name="Servers Owned"

@ -37,7 +37,7 @@ export const StatsRow = ({ name, color, classes = useStyles(), children, data }:
<Typography style={{ color: color }}>{name}</Typography> <Typography style={{ color: color }}>{name}</Typography>
</TableCell> </TableCell>
<TableCell align="right" classes={{ root: classes.cellNone }}> <TableCell align="right" classes={{ root: classes.cellNone }}>
<Typography style={{ color: color }}>{content}</Typography> {content ? <Typography style={{ color: color }}>{content}</Typography> : <></>}
{children} {children}
</TableCell> </TableCell>
</TableRow> </TableRow>