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}
|
probPercent={probPercent}
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
<ContractDetails contract={contract} />
|
<AbbrContractDetails contract={contract} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -85,23 +85,32 @@ export function ResolutionOrChance(props: {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ContractDetails(props: {
|
export function AbbrContractDetails(props: { contract: Contract }) {
|
||||||
contract: Contract
|
const { contract } = props
|
||||||
inlineTags?: boolean
|
const { truePool } = compute(contract)
|
||||||
}) {
|
|
||||||
const { contract, inlineTags } = props
|
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 { question, description } = contract
|
||||||
const { truePool, createdDate, resolvedDate } = compute(contract)
|
const { truePool, createdDate, resolvedDate } = compute(contract)
|
||||||
|
|
||||||
const tags = parseTags(`${question} ${description}`).map((tag) => `#${tag}`)
|
const tags = parseTags(`${question} ${description}`).map((tag) => `#${tag}`)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col
|
<Col className="text-sm text-gray-500 gap-2 sm:flex-row sm:flex-wrap">
|
||||||
className={clsx(
|
|
||||||
'text-sm text-gray-500 gap-2',
|
|
||||||
inlineTags && 'sm:flex-row sm:flex-wrap'
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Row className="gap-2 flex-wrap">
|
<Row className="gap-2 flex-wrap">
|
||||||
<div className="whitespace-nowrap">
|
<div className="whitespace-nowrap">
|
||||||
<UserLink username={contract.creatorUsername} />
|
<UserLink username={contract.creatorUsername} />
|
||||||
|
@ -114,17 +123,19 @@ export function ContractDetails(props: {
|
||||||
<div className="whitespace-nowrap">{formatMoney(truePool)} pool</div>
|
<div className="whitespace-nowrap">{formatMoney(truePool)} pool</div>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
{inlineTags && tags.length > 0 && (
|
{tags.length > 0 && (
|
||||||
<div className="hidden sm:block">•</div>
|
<>
|
||||||
)}
|
<div className="hidden sm:block">•</div>
|
||||||
|
|
||||||
<Row className="gap-2 flex-wrap">
|
<Row className="gap-2 flex-wrap">
|
||||||
{tags.map((tag) => (
|
{tags.map((tag) => (
|
||||||
<div key={tag} className="bg-gray-100 px-1">
|
<div key={tag} className="bg-gray-100 px-1">
|
||||||
<Linkify text={tag} gray />
|
<Linkify text={tag} gray />
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</Row>
|
</Row>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ export const ContractOverview = (props: {
|
||||||
large
|
large
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<ContractDetails contract={contract} inlineTags />
|
<ContractDetails contract={contract} />
|
||||||
<TweetButton tweetText={tweetText} />
|
<TweetButton tweetText={tweetText} />
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,8 @@ import { getFirestore } from '@firebase/firestore'
|
||||||
import { initializeApp } from 'firebase/app'
|
import { initializeApp } from 'firebase/app'
|
||||||
|
|
||||||
// TODO: Reenable this when we have a way to set the Firebase db in dev
|
// 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 = process.env.NODE_ENV === 'production'
|
||||||
// export const isProd = true
|
export const isProd = true
|
||||||
|
|
||||||
const firebaseConfig = isProd
|
const firebaseConfig = isProd
|
||||||
? {
|
? {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user