import clsx from 'clsx' import Link from 'next/link' import _ from 'lodash' import { Row } from '../layout/row' import { formatPercent } from '../../../common/util/format' import { Contract, contractPath, getBinaryProbPercent, } from '../../lib/firebase/contracts' import { Col } from '../layout/col' import { Spacer } from '../layout/spacer' import { Binary, CPMM, DPM, FreeResponse, FreeResponseContract, FullContract, } from '../../../common/contract' import { AnswerLabel, BinaryContractOutcomeLabel, FreeResponseOutcomeLabel, } from '../outcome-label' import { getOutcomeProbability, getTopAnswer } from '../../../common/calculate' import { AbbrContractDetails } from './contract-details' export function ContractCard(props: { contract: Contract showHotVolume?: boolean showCloseTime?: boolean className?: string }) { const { contract, showHotVolume, showCloseTime, className } = props const { question, outcomeType, resolution } = contract return (