diff --git a/web/components/contract/quick-bet.tsx b/web/components/contract/quick-bet.tsx index 8f642656..e1a2eead 100644 --- a/web/components/contract/quick-bet.tsx +++ b/web/components/contract/quick-bet.tsx @@ -6,7 +6,7 @@ import { } from 'common/calculate' import { getExpectedValue } from 'common/calculate-dpm' import { User } from 'common/user' -import { Contract, NumericContract } from 'common/contract' +import { Contract, NumericContract, resolution } from 'common/contract' import { formatLargeNumber, formatMoney, @@ -264,7 +264,7 @@ export function getColor(contract: Contract, previewProb?: number) { const { resolution } = contract if (resolution) { return ( - OUTCOME_TO_COLOR[resolution as 'YES' | 'NO' | 'CANCEL' | 'MKT'] ?? + OUTCOME_TO_COLOR[resolution as resolution] ?? // If resolved to a FR answer, use 'primary' 'primary' ) diff --git a/web/components/outcome-label.tsx b/web/components/outcome-label.tsx index 0ead4f94..f76b091b 100644 --- a/web/components/outcome-label.tsx +++ b/web/components/outcome-label.tsx @@ -41,7 +41,7 @@ export function OutcomeLabel(props: { } export function BinaryOutcomeLabel(props: { - outcome: 'YES' | 'NO' | 'CANCEL' | 'MKT' + outcome: resolution }) { const { outcome } = props @@ -53,7 +53,7 @@ export function BinaryOutcomeLabel(props: { export function BinaryContractOutcomeLabel(props: { contract: BinaryContract - resolution: 'YES' | 'NO' | 'CANCEL' | 'MKT' + resolution: resolution }) { const { contract, resolution } = props