2021-03-16 04:40:28 +01:00
|
|
|
import * as React from "react";
|
|
|
|
|
2021-09-10 03:38:05 +02:00
|
|
|
interface IProps {
|
|
|
|
title: string;
|
|
|
|
stats: any[][];
|
|
|
|
}
|
|
|
|
|
|
|
|
export function EarningsTableElement(props: IProps): React.ReactElement {
|
2021-09-05 01:09:30 +02:00
|
|
|
return (
|
|
|
|
<>
|
2021-09-10 03:38:05 +02:00
|
|
|
<pre>{props.title}</pre>
|
2021-09-05 01:09:30 +02:00
|
|
|
<table>
|
|
|
|
<tbody>
|
2021-09-10 03:38:05 +02:00
|
|
|
{props.stats.map((stat: any[], i: number) => (
|
2021-09-05 01:09:30 +02:00
|
|
|
<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>
|
|
|
|
</>
|
|
|
|
);
|
2021-03-16 04:40:28 +01:00
|
|
|
}
|