From e20537bf491ad20f447bb59231089d2cbc2bc029 Mon Sep 17 00:00:00 2001 From: jahooma Date: Wed, 5 Jan 2022 01:06:30 -0600 Subject: [PATCH] Remove tags and date from card. --- web/components/contract-card.tsx | 55 +++++++++++++++++----------- web/components/contract-overview.tsx | 2 +- web/lib/firebase/init.ts | 4 +- 3 files changed, 36 insertions(+), 25 deletions(-) diff --git a/web/components/contract-card.tsx b/web/components/contract-card.tsx index e1dc939b..438f7ab2 100644 --- a/web/components/contract-card.tsx +++ b/web/components/contract-card.tsx @@ -27,7 +27,7 @@ export function ContractCard(props: { contract: Contract }) { probPercent={probPercent} /> - + @@ -85,23 +85,32 @@ export function ResolutionOrChance(props: { ) } -export function ContractDetails(props: { - contract: Contract - inlineTags?: boolean -}) { - const { contract, inlineTags } = props +export function AbbrContractDetails(props: { contract: Contract }) { + const { contract } = props + const { truePool } = compute(contract) + + return ( + + +
+ +
+
+
{formatMoney(truePool)} pool
+
+ + ) +} + +export function ContractDetails(props: { contract: Contract }) { + const { contract } = props const { question, description } = contract const { truePool, createdDate, resolvedDate } = compute(contract) const tags = parseTags(`${question} ${description}`).map((tag) => `#${tag}`) return ( - +
@@ -114,17 +123,19 @@ export function ContractDetails(props: {
{formatMoney(truePool)} pool
- {inlineTags && tags.length > 0 && ( -
- )} + {tags.length > 0 && ( + <> +
- - {tags.map((tag) => ( -
- -
- ))} -
+ + {tags.map((tag) => ( +
+ +
+ ))} +
+ + )} ) } diff --git a/web/components/contract-overview.tsx b/web/components/contract-overview.tsx index a3b1077e..88f788e9 100644 --- a/web/components/contract-overview.tsx +++ b/web/components/contract-overview.tsx @@ -67,7 +67,7 @@ export const ContractOverview = (props: { large /> - + diff --git a/web/lib/firebase/init.ts b/web/lib/firebase/init.ts index ba10545a..98734946 100644 --- a/web/lib/firebase/init.ts +++ b/web/lib/firebase/init.ts @@ -2,8 +2,8 @@ import { getFirestore } from '@firebase/firestore' import { initializeApp } from 'firebase/app' // TODO: Reenable this when we have a way to set the Firebase db in dev -export const isProd = process.env.NODE_ENV === 'production' -// export const isProd = true +// export const isProd = process.env.NODE_ENV === 'production' +export const isProd = true const firebaseConfig = isProd ? {