Conditionally show YES or NO max payout

This commit is contained in:
James Grugett 2022-07-17 15:38:30 -05:00
parent bc33f9572f
commit 16c11adc61

View File

@ -554,53 +554,59 @@ function RangeOrderPanel(props: {
/> />
<Col className="mt-3 w-full gap-3"> <Col className="mt-3 w-full gap-3">
<Row className="items-center justify-between gap-2 text-sm"> {lowLimitProb !== undefined && (
<Row className="flex-nowrap items-center gap-2 whitespace-nowrap text-gray-500"> <Row className="items-center justify-between gap-2 text-sm">
<Row className="flex-nowrap items-center gap-2 whitespace-nowrap text-gray-500">
<div>
{isPseudoNumeric ? (
'Max payout'
) : (
<>
Max <BinaryOutcomeLabel outcome={'YES'} /> payout
</>
)}
</div>
<InfoTooltip
text={`Includes ${formatMoneyWithDecimals(lowFees)} in fees`}
/>
</Row>
<div> <div>
{isPseudoNumeric ? ( <span className="mr-2 whitespace-nowrap">
'Max payout' {formatMoney(lowPayout)}
) : ( </span>
<> (+{lowReturnPercent})
Max <BinaryOutcomeLabel outcome={'YES'} /> payout
</>
)}
</div> </div>
<InfoTooltip
text={`Includes ${formatMoneyWithDecimals(lowFees)} in fees`}
/>
</Row> </Row>
<div> )}
<span className="mr-2 whitespace-nowrap"> {highLimitProb !== undefined && (
{formatMoney(lowPayout)} <Row className="items-center justify-between gap-2 text-sm">
</span> <Row className="flex-nowrap items-center gap-2 whitespace-nowrap text-gray-500">
(+{lowReturnPercent}) <div>
</div> {isPseudoNumeric ? (
</Row> 'Max payout'
<Row className="items-center justify-between gap-2 text-sm"> ) : (
<Row className="flex-nowrap items-center gap-2 whitespace-nowrap text-gray-500"> <>
Max <BinaryOutcomeLabel outcome={'NO'} /> payout
</>
)}
</div>
<InfoTooltip
text={`Includes ${formatMoneyWithDecimals(highFees)} in fees`}
/>
</Row>
<div> <div>
{isPseudoNumeric ? ( <span className="mr-2 whitespace-nowrap">
'Max payout' {formatMoney(highPayout)}
) : ( </span>
<> (+{highReturnPercent})
Max <BinaryOutcomeLabel outcome={'NO'} /> payout
</>
)}
</div> </div>
<InfoTooltip
text={`Includes ${formatMoneyWithDecimals(highFees)} in fees`}
/>
</Row> </Row>
<div> )}
<span className="mr-2 whitespace-nowrap">
{formatMoney(highPayout)}
</span>
(+{highReturnPercent})
</div>
</Row>
</Col> </Col>
<Spacer h={8} /> {(lowLimitProb !== undefined || highLimitProb !== undefined) && (
<Spacer h={8} />
)}
{user && ( {user && (
<button <button