Remove tags and date from card.
This commit is contained in:
parent
1bc323d575
commit
e20537bf49
|
@ -27,7 +27,7 @@ export function ContractCard(props: { contract: Contract }) {
|
|||
probPercent={probPercent}
|
||||
/>
|
||||
</Row>
|
||||
<ContractDetails contract={contract} />
|
||||
<AbbrContractDetails contract={contract} />
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
@ -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 (
|
||||
<Col className={clsx('text-sm text-gray-500 gap-2')}>
|
||||
<Row className="gap-2 flex-wrap">
|
||||
<div className="whitespace-nowrap">
|
||||
<UserLink username={contract.creatorUsername} />
|
||||
</div>
|
||||
<div className="">•</div>
|
||||
<div className="whitespace-nowrap">{formatMoney(truePool)} pool</div>
|
||||
</Row>
|
||||
</Col>
|
||||
)
|
||||
}
|
||||
|
||||
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 (
|
||||
<Col
|
||||
className={clsx(
|
||||
'text-sm text-gray-500 gap-2',
|
||||
inlineTags && 'sm:flex-row sm:flex-wrap'
|
||||
)}
|
||||
>
|
||||
<Col className="text-sm text-gray-500 gap-2 sm:flex-row sm:flex-wrap">
|
||||
<Row className="gap-2 flex-wrap">
|
||||
<div className="whitespace-nowrap">
|
||||
<UserLink username={contract.creatorUsername} />
|
||||
|
@ -114,9 +123,9 @@ export function ContractDetails(props: {
|
|||
<div className="whitespace-nowrap">{formatMoney(truePool)} pool</div>
|
||||
</Row>
|
||||
|
||||
{inlineTags && tags.length > 0 && (
|
||||
{tags.length > 0 && (
|
||||
<>
|
||||
<div className="hidden sm:block">•</div>
|
||||
)}
|
||||
|
||||
<Row className="gap-2 flex-wrap">
|
||||
{tags.map((tag) => (
|
||||
|
@ -125,6 +134,8 @@ export function ContractDetails(props: {
|
|||
</div>
|
||||
))}
|
||||
</Row>
|
||||
</>
|
||||
)}
|
||||
</Col>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ export const ContractOverview = (props: {
|
|||
large
|
||||
/>
|
||||
|
||||
<ContractDetails contract={contract} inlineTags />
|
||||
<ContractDetails contract={contract} />
|
||||
<TweetButton tweetText={tweetText} />
|
||||
</Col>
|
||||
|
||||
|
|
|
@ -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
|
||||
? {
|
||||
|
|
Loading…
Reference in New Issue
Block a user