mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 12:27:07 +02:00
UI: Added new locale-aware and configurable number formatting (#354)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import * as React from "react";
|
||||
import { numeralWrapper } from "../numeralFormat";
|
||||
import { formatHashes } from "../formatNumber";
|
||||
import { Theme } from "@mui/material/styles";
|
||||
import makeStyles from "@mui/styles/makeStyles";
|
||||
import createStyles from "@mui/styles/createStyles";
|
||||
@@ -14,7 +14,5 @@ const useStyles = makeStyles((theme: Theme) =>
|
||||
|
||||
export function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<span className={classes.money}>{typeof hashes === "number" ? numeralWrapper.formatHashes(hashes) : hashes}</span>
|
||||
);
|
||||
return <span className={classes.money}>{typeof hashes === "number" ? formatHashes(hashes) : hashes}</span>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user