mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 13:57:05 +02:00
prettify, sorry for the big ass commit
This commit is contained in:
@@ -1,20 +1,31 @@
|
||||
import * as React from "react";
|
||||
|
||||
export function EarningsTableElement(title: string, stats: any[][]): React.ReactElement {
|
||||
return (<>
|
||||
<pre>{title}</pre>
|
||||
<table>
|
||||
<tbody>
|
||||
{stats.map((stat: any[], i: number) => <tr key={i}>
|
||||
{stat.map((s: any, i: number) => {
|
||||
let style = {};
|
||||
if(i !== 0) {
|
||||
style = {textAlign: "right"};
|
||||
}
|
||||
return <td style={style} key={i}>{s}</td>
|
||||
})}
|
||||
</tr>)}
|
||||
</tbody>
|
||||
</table>
|
||||
</>)
|
||||
export function EarningsTableElement(
|
||||
title: string,
|
||||
stats: any[][],
|
||||
): React.ReactElement {
|
||||
return (
|
||||
<>
|
||||
<pre>{title}</pre>
|
||||
<table>
|
||||
<tbody>
|
||||
{stats.map((stat: any[], i: number) => (
|
||||
<tr key={i}>
|
||||
{stat.map((s: any, i: number) => {
|
||||
let style = {};
|
||||
if (i !== 0) {
|
||||
style = { textAlign: "right" };
|
||||
}
|
||||
return (
|
||||
<td style={style} key={i}>
|
||||
{s}
|
||||
</td>
|
||||
);
|
||||
})}
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user