From 21527275d1eabd7f3a9391b8187b55b8d30d9677 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 22 May 2022 22:03:05 -0500 Subject: [PATCH] Fix numeric market embeds --- web/pages/embed/[username]/[contractSlug].tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/web/pages/embed/[username]/[contractSlug].tsx b/web/pages/embed/[username]/[contractSlug].tsx index 9cffb8d4..ff485aae 100644 --- a/web/pages/embed/[username]/[contractSlug].tsx +++ b/web/pages/embed/[username]/[contractSlug].tsx @@ -17,10 +17,10 @@ import { } from 'web/components/contract/contract-card' import { ContractDetails } from 'web/components/contract/contract-details' 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 { Row } from 'web/components/layout/row' import { Spacer } from 'web/components/layout/spacer' -import { Linkify } from 'web/components/linkify' import { SiteLink } from 'web/components/site-link' import { useContractWithPreload } from 'web/hooks/use-contract' import { useMeasureSize } from 'web/hooks/use-measure-size' @@ -125,14 +125,14 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) { )} - {outcomeType === 'FREE_RESPONSE' && resolution && ( + {outcomeType === 'FREE_RESPONSE' && ( )} - {outcomeType === 'NUMERIC' && resolution && ( + {outcomeType === 'NUMERIC' && ( @@ -143,19 +143,28 @@ function ContractEmbed(props: { contract: Contract; bets: Bet[] }) {
- {isBinary ? ( + {isBinary && ( - ) : ( + )} + + {outcomeType === 'FREE_RESPONSE' && ( } bets={bets} height={graphHeight} /> )} + + {outcomeType === 'NUMERIC' && ( + + )}
)