From e66564cd1f14de2f8e4febe0d0a3aaab8df4e368 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 8 Feb 2022 22:52:09 -0600 Subject: [PATCH] Add current prob to trades items --- web/components/bets-list.tsx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 6cff5c8b..f908ead8 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -18,6 +18,7 @@ import { Contract, getContractFromId, contractPath, + contractMetrics, } from '../lib/firebase/contracts' import { Row } from './layout/row' import { UserLink } from './user-page' @@ -121,7 +122,7 @@ function MyContractBets(props: { contract: Contract; bets: Bet[] }) { const { resolution } = contract const [collapsed, setCollapsed] = useState(true) - + const { probPercent } = contractMetrics(contract) return (
- + + {resolution ? ( +
+ Resolved +
+ ) : ( +
{probPercent}
+ )} +
- {resolution && ( - <> -
-
- Resolved -
- - )}