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>
</>
</StatsRow>
{player.companyName && (
{player.companyName ? (
<>
<StatsRow
name="Last Employer"
@ -249,8 +249,10 @@ export function CharacterStats(): React.ReactElement {
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={{}}>
<>
<span style={{ color: Settings.theme.primary }}>{Object.keys(player.jobs).length} total</span>
@ -259,6 +261,8 @@ export function CharacterStats(): React.ReactElement {
</IconButton>
</>
</StatsRow>
) : (
<></>
)}
<StatsRow
name="Servers Owned"

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