handle billions in ISK/M
This commit is contained in:
@@ -290,21 +290,22 @@ export const PlanetTableRow = ({
|
|||||||
textAlign: "end",
|
textAlign: "end",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{exports.map((e) => (
|
{exports.map((e) => {
|
||||||
<Typography
|
const valueInMillions = (((piPrices?.appraisal.items.find((a) => a.typeID === e.typeId)
|
||||||
key={`export-praisal-${character.character.characterId}-${planet.planet_id}-${e.typeId}`}
|
?.prices.sell.min ?? 0) * e.amount) / 1000000) * 24 * 30;
|
||||||
fontSize={theme.custom.smallText}
|
const displayValue = valueInMillions >= 1000
|
||||||
>
|
? `${(valueInMillions / 1000).toFixed(2)} B`
|
||||||
{`${(
|
: `${valueInMillions.toFixed(2)} M`;
|
||||||
(((piPrices?.appraisal.items.find((a) => a.typeID === e.typeId)
|
|
||||||
?.prices.sell.min ?? 0) *
|
return (
|
||||||
e.amount) /
|
<Typography
|
||||||
1000000) *
|
key={`export-praisal-${character.character.characterId}-${planet.planet_id}-${e.typeId}`}
|
||||||
24 *
|
fontSize={theme.custom.smallText}
|
||||||
30
|
>
|
||||||
).toFixed(2)} M`}
|
{displayValue}
|
||||||
</Typography>
|
</Typography>
|
||||||
))}
|
);
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
|
Reference in New Issue
Block a user