From 4224c7defd1415ea3a683a7bf715188fbc6eab93 Mon Sep 17 00:00:00 2001 From: phyzical Date: Sat, 2 Apr 2022 00:37:42 +0800 Subject: [PATCH] fix stock price estimate text when selling --- src/Corporation/ui/modals/SellSharesModal.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Corporation/ui/modals/SellSharesModal.tsx b/src/Corporation/ui/modals/SellSharesModal.tsx index 1545861e0..fa2a05774 100644 --- a/src/Corporation/ui/modals/SellSharesModal.tsx +++ b/src/Corporation/ui/modals/SellSharesModal.tsx @@ -34,16 +34,18 @@ export function SellSharesModal(props: IProps): React.ReactElement { function ProfitIndicator(props: { shares: number | null; corp: ICorporation }): React.ReactElement { if (props.shares === null) return <>; if (isNaN(props.shares) || props.shares <= 0) { - return <>ERROR: Invalid value entered for number of shares to sell; + return ERROR: Invalid value entered for number of shares to sell ; } else if (props.shares > corp.numShares) { - return <>You don't have this many shares to sell!; + return You don't have this many shares to sell! ; } else { const stockSaleResults = corp.calculateShareSale(props.shares); const profit = stockSaleResults[0]; return ( - <> - Sell {props.shares} shares for a total of {numeralWrapper.formatMoney(profit)} - + + + Sell {props.shares} shares for a total of {numeralWrapper.formatMoney(profit)} + + ); } }