diff --git a/web/components/contract-card.tsx b/web/components/contract-card.tsx index 1920c494..9623d5e9 100644 --- a/web/components/contract-card.tsx +++ b/web/components/contract-card.tsx @@ -9,8 +9,11 @@ import { Col } from './layout/col' import { parseTags } from '../lib/util/parse' import dayjs from 'dayjs' -export function ContractCard(props: { contract: Contract }) { - const { contract } = props +export function ContractCard(props: { + contract: Contract + showHotVolume?: boolean +}) { + const { contract, showHotVolume } = props const { question, resolution } = contract const { probPercent } = compute(contract) @@ -28,7 +31,10 @@ export function ContractCard(props: { contract: Contract }) { probPercent={probPercent} /> - + @@ -86,8 +92,12 @@ export function ResolutionOrChance(props: { ) } -export function AbbrContractDetails(props: { contract: Contract }) { - const { contract } = props +export function AbbrContractDetails(props: { + contract: Contract + showHotVolume?: boolean +}) { + const { contract, showHotVolume } = props + const { volume24Hours } = contract const { truePool } = compute(contract) return ( @@ -96,8 +106,14 @@ export function AbbrContractDetails(props: { contract: Contract }) {
-
-
{formatMoney(truePool)} pool
+
+ {showHotVolume ? ( +
+ {formatMoney(volume24Hours)} 🔥 +
+ ) : ( +
{formatMoney(truePool)} pool
+ )} ) diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx index e1044d65..3c8913b6 100644 --- a/web/components/contracts-list.tsx +++ b/web/components/contracts-list.tsx @@ -11,7 +11,12 @@ import { parseTags } from '../lib/util/parse' import { ContractCard } from './contract-card' import { Sort, useQueryAndSortParams } from '../hooks/use-sort-and-query-params' -export function ContractsGrid(props: { contracts: Contract[] }) { +export function ContractsGrid(props: { + contracts: Contract[] + showHotVolume?: boolean +}) { + const { showHotVolume } = props + const [resolvedContracts, activeContracts] = _.partition( props.contracts, (c) => c.isResolved @@ -35,7 +40,11 @@ export function ContractsGrid(props: { contracts: Contract[] }) { return ( ) diff --git a/web/pages/markets.tsx b/web/pages/markets.tsx index 31e6e64d..5a3c70f8 100644 --- a/web/pages/markets.tsx +++ b/web/pages/markets.tsx @@ -42,7 +42,7 @@ export default function Markets(props: {
- <ContractsGrid contracts={readyHotContracts} /> + <ContractsGrid contracts={readyHotContracts} showHotVolume /> </div> <Spacer h={10} />