pseudo numeric embeds
This commit is contained in:
parent
a44b3606fe
commit
e8f155e3a8
|
@ -7,6 +7,7 @@ import {
|
|||
BinaryResolutionOrChance,
|
||||
FreeResponseResolutionOrChance,
|
||||
NumericResolutionOrExpectation,
|
||||
PseudoNumericResolutionOrExpectation,
|
||||
} from 'web/components/contract/contract-card'
|
||||
import { ContractDetails } from 'web/components/contract/contract-details'
|
||||
import { ContractProbGraph } from 'web/components/contract/contract-prob-graph'
|
||||
|
@ -79,6 +80,7 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
|
|||
const { question, outcomeType } = contract
|
||||
|
||||
const isBinary = outcomeType === 'BINARY'
|
||||
const isPseudoNumeric = outcomeType === 'PSEUDO_NUMERIC'
|
||||
|
||||
const href = `https://${DOMAIN}${contractPath(contract)}`
|
||||
|
||||
|
@ -110,13 +112,18 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
|
|||
|
||||
{isBinary && (
|
||||
<Row className="items-center gap-4">
|
||||
{/* this fails typechecking, but it doesn't explode because we will
|
||||
never */}
|
||||
<BetRow contract={contract as any} betPanelClassName="scale-75" />
|
||||
<BetRow contract={contract} betPanelClassName="scale-75" />
|
||||
<BinaryResolutionOrChance contract={contract} />
|
||||
</Row>
|
||||
)}
|
||||
|
||||
{isPseudoNumeric && (
|
||||
<Row className="items-center gap-4">
|
||||
<BetRow contract={contract} betPanelClassName="scale-75" />
|
||||
<PseudoNumericResolutionOrExpectation contract={contract} />
|
||||
</Row>
|
||||
)}
|
||||
|
||||
{outcomeType === 'FREE_RESPONSE' && (
|
||||
<FreeResponseResolutionOrChance
|
||||
contract={contract}
|
||||
|
@ -133,7 +140,7 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
|
|||
</div>
|
||||
|
||||
<div className="mx-1" style={{ paddingBottom }}>
|
||||
{isBinary && (
|
||||
{(isBinary || isPseudoNumeric) && (
|
||||
<ContractProbGraph
|
||||
contract={contract}
|
||||
bets={bets}
|
||||
|
|
Loading…
Reference in New Issue
Block a user