Fix numeric market embeds
This commit is contained in:
parent
1c73bba908
commit
21527275d1
|
@ -17,10 +17,10 @@ import {
|
||||||
} from 'web/components/contract/contract-card'
|
} from 'web/components/contract/contract-card'
|
||||||
import { ContractDetails } from 'web/components/contract/contract-details'
|
import { ContractDetails } from 'web/components/contract/contract-details'
|
||||||
import { ContractProbGraph } from 'web/components/contract/contract-prob-graph'
|
import { ContractProbGraph } from 'web/components/contract/contract-prob-graph'
|
||||||
|
import { NumericGraph } from 'web/components/contract/numeric-graph'
|
||||||
import { Col } from 'web/components/layout/col'
|
import { Col } from 'web/components/layout/col'
|
||||||
import { Row } from 'web/components/layout/row'
|
import { Row } from 'web/components/layout/row'
|
||||||
import { Spacer } from 'web/components/layout/spacer'
|
import { Spacer } from 'web/components/layout/spacer'
|
||||||
import { Linkify } from 'web/components/linkify'
|
|
||||||
import { SiteLink } from 'web/components/site-link'
|
import { SiteLink } from 'web/components/site-link'
|
||||||
import { useContractWithPreload } from 'web/hooks/use-contract'
|
import { useContractWithPreload } from 'web/hooks/use-contract'
|
||||||
import { useMeasureSize } from 'web/hooks/use-measure-size'
|
import { useMeasureSize } from 'web/hooks/use-measure-size'
|
||||||
|
@ -125,14 +125,14 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{outcomeType === 'FREE_RESPONSE' && resolution && (
|
{outcomeType === 'FREE_RESPONSE' && (
|
||||||
<FreeResponseResolutionOrChance
|
<FreeResponseResolutionOrChance
|
||||||
contract={contract}
|
contract={contract}
|
||||||
truncate="long"
|
truncate="long"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{outcomeType === 'NUMERIC' && resolution && (
|
{outcomeType === 'NUMERIC' && (
|
||||||
<NumericResolutionOrExpectation
|
<NumericResolutionOrExpectation
|
||||||
contract={contract as NumericContract}
|
contract={contract as NumericContract}
|
||||||
/>
|
/>
|
||||||
|
@ -143,19 +143,28 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mx-1" style={{ paddingBottom }}>
|
<div className="mx-1" style={{ paddingBottom }}>
|
||||||
{isBinary ? (
|
{isBinary && (
|
||||||
<ContractProbGraph
|
<ContractProbGraph
|
||||||
contract={contract}
|
contract={contract}
|
||||||
bets={bets}
|
bets={bets}
|
||||||
height={graphHeight}
|
height={graphHeight}
|
||||||
/>
|
/>
|
||||||
) : (
|
)}
|
||||||
|
|
||||||
|
{outcomeType === 'FREE_RESPONSE' && (
|
||||||
<AnswersGraph
|
<AnswersGraph
|
||||||
contract={contract as FullContract<DPM, FreeResponse>}
|
contract={contract as FullContract<DPM, FreeResponse>}
|
||||||
bets={bets}
|
bets={bets}
|
||||||
height={graphHeight}
|
height={graphHeight}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{outcomeType === 'NUMERIC' && (
|
||||||
|
<NumericGraph
|
||||||
|
contract={contract as NumericContract}
|
||||||
|
height={graphHeight}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user