mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-25 07:32:27 +01:00
Update StatsRow
This commit is contained in:
parent
35fa6dcca1
commit
4c15b77d21
@ -16,19 +16,21 @@ interface IProps {
|
|||||||
name: string;
|
name: string;
|
||||||
color: string;
|
color: string;
|
||||||
classes?: any;
|
classes?: any;
|
||||||
data: ITableRowData;
|
data?: ITableRowData;
|
||||||
children?: React.ReactElement;
|
children?: React.ReactElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const StatsRow = ({ name, color, classes = useStyles(), children, data }: IProps): React.ReactElement => {
|
export const StatsRow = ({ name, color, classes = useStyles(), children, data }: IProps): React.ReactElement => {
|
||||||
let content;
|
let content = "";
|
||||||
|
|
||||||
if (data.content !== undefined) {
|
if (data) {
|
||||||
content = data.content;
|
if (data.content !== undefined) {
|
||||||
} else if (data.level !== undefined && data.exp !== undefined) {
|
content = data.content;
|
||||||
content = `${formatNumber(data.level, 0)} (${numeralWrapper.formatExp(data.exp)} exp)`;
|
} else if (data.level !== undefined && data.exp !== undefined) {
|
||||||
} else if (data.level !== undefined && data.exp === undefined) {
|
content = `${formatNumber(data.level, 0)} (${numeralWrapper.formatExp(data.exp)} exp)`;
|
||||||
content = `${formatNumber(data.level, 0)}`;
|
} else if (data.level !== undefined && data.exp === undefined) {
|
||||||
|
content = `${formatNumber(data.level, 0)}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user