From 72f77c668fd144d5b2ed2a7681ec28fa196ea83b Mon Sep 17 00:00:00 2001 From: mantikoros Date: Tue, 14 Dec 2021 11:43:51 -0600 Subject: [PATCH] ContractCard: color resolution text --- web/components/contracts-list.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web/components/contracts-list.tsx b/web/components/contracts-list.tsx index e8ab2160..c6f51fa9 100644 --- a/web/components/contracts-list.tsx +++ b/web/components/contracts-list.tsx @@ -24,6 +24,17 @@ export function ContractDetails(props: { contract: Contract }) { function ContractCard(props: { contract: Contract }) { const { contract } = props const { probPercent } = compute(contract) + const { resolution } = contract + + const resolutionColor = ( + resolution === 'YES' + ? 'text-primary' + : resolution === 'NO' + ? 'text-red-400' + : resolution === 'CANCEL' + ? 'text-yellow-400' + : '' + ) return ( @@ -42,7 +53,7 @@ function ContractCard(props: { contract: Contract }) { {/* Right side of card */} - + {contract.resolution || (
{probPercent}