From e8f155e3a853a3a20493858f85d5ba296c5cd2e0 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Fri, 1 Jul 2022 17:59:01 -0400 Subject: [PATCH] pseudo numeric embeds --- web/pages/embed/[username]/[contractSlug].tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/web/pages/embed/[username]/[contractSlug].tsx b/web/pages/embed/[username]/[contractSlug].tsx index 98bf37b2..93439be7 100644 --- a/web/pages/embed/[username]/[contractSlug].tsx +++ b/web/pages/embed/[username]/[contractSlug].tsx @@ -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 && ( - {/* this fails typechecking, but it doesn't explode because we will - never */} - + )} + {isPseudoNumeric && ( + + + + + )} + {outcomeType === 'FREE_RESPONSE' && (
- {isBinary && ( + {(isBinary || isPseudoNumeric) && (