From 7c82221a13f16bdcf6792df91c63fbe361a257b1 Mon Sep 17 00:00:00 2001 From: Caldwell <115591472+zerbosh@users.noreply.github.com> Date: Fri, 1 Sep 2023 02:29:04 +0200 Subject: [PATCH] CORP: Change some number formatting to look better (#764) changed formatCorpStat to formatBigNumber to make big numbers readable --- src/Corporation/ui/ProductElem.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Corporation/ui/ProductElem.tsx b/src/Corporation/ui/ProductElem.tsx index 69ef55381..11a9c5ed9 100644 --- a/src/Corporation/ui/ProductElem.tsx +++ b/src/Corporation/ui/ProductElem.tsx @@ -9,7 +9,7 @@ import { SellProductModal } from "./modals/SellProductModal"; import { ProductMarketTaModal } from "./modals/ProductMarketTaModal"; import { CancelProductModal } from "./modals/CancelProductModal"; -import { formatBigNumber, formatCorpStat, formatMoney, formatPercent } from "../../ui/formatNumber"; +import { formatBigNumber, formatMoney, formatPercent } from "../../ui/formatNumber"; import { isString } from "../../utils/helpers/string"; import { Money } from "../../ui/React/Money"; @@ -67,7 +67,7 @@ export function ProductElem(props: IProductProps): React.ReactElement { // Limit Production button const productionLimit = product.cityData[city].productionLimit; const limitProductionButtonText = - "Limit Production" + (productionLimit !== null ? " (" + formatCorpStat(productionLimit) + ")" : ""); + "Limit Production" + (productionLimit !== null ? " (" + formatBigNumber(productionLimit) + ")" : ""); return ( @@ -109,29 +109,29 @@ export function ProductElem(props: IProductProps): React.ReactElement { title={ Effective rating is calculated from product rating and the quality of materials used
- Rating: {formatCorpStat(product.rating)}

- Quality: {formatCorpStat(product.stats.quality)}
- Performance: {formatCorpStat(product.stats.performance)}
- Durability: {formatCorpStat(product.stats.durability)}
- Reliability: {formatCorpStat(product.stats.reliability)}
- Aesthetics: {formatCorpStat(product.stats.aesthetics)}
- Features: {formatCorpStat(product.stats.features)} + Rating: {formatBigNumber(product.rating)}

+ Quality: {formatBigNumber(product.stats.quality)}
+ Performance: {formatBigNumber(product.stats.performance)}
+ Durability: {formatBigNumber(product.stats.durability)}
+ Reliability: {formatBigNumber(product.stats.reliability)}
+ Aesthetics: {formatBigNumber(product.stats.aesthetics)}
+ Features: {formatBigNumber(product.stats.features)} {corp.unlocks.has(CorpUnlockName.MarketResearchDemand) && ( <>
- {"Demand: " + formatCorpStat(product.demand)} + {"Demand: " + formatBigNumber(product.demand)} )} {corp.unlocks.has(CorpUnlockName.MarketDataCompetition) && ( <>
- {"Competition: " + formatCorpStat(product.competition)} + {"Competition: " + formatBigNumber(product.competition)} )}
} > - Effective rating: {formatCorpStat(product.cityData[city].effectiveRating)} + Effective rating: {formatBigNumber(product.cityData[city].effectiveRating)}