Rename liquidity label to volume label
This commit is contained in:
parent
6b61d7209d
commit
510e4400d3
|
@ -131,7 +131,7 @@ function AbbrContractDetails(props: {
|
||||||
}) {
|
}) {
|
||||||
const { contract, showHotVolume, showCloseTime } = props
|
const { contract, showHotVolume, showCloseTime } = props
|
||||||
const { volume24Hours, creatorName, creatorUsername, closeTime } = contract
|
const { volume24Hours, creatorName, creatorUsername, closeTime } = contract
|
||||||
const { liquidityLabel } = contractMetrics(contract)
|
const { volumeLabel } = contractMetrics(contract)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col className={clsx('gap-2 text-sm text-gray-500')}>
|
<Col className={clsx('gap-2 text-sm text-gray-500')}>
|
||||||
|
@ -162,7 +162,7 @@ function AbbrContractDetails(props: {
|
||||||
) : (
|
) : (
|
||||||
<Row className="gap-1">
|
<Row className="gap-1">
|
||||||
{/* <DatabaseIcon className="h-5 w-5" /> */}
|
{/* <DatabaseIcon className="h-5 w-5" /> */}
|
||||||
{liquidityLabel}
|
{volumeLabel}
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -177,8 +177,7 @@ export function ContractDetails(props: {
|
||||||
}) {
|
}) {
|
||||||
const { contract, isCreator, hideShareButtons } = props
|
const { contract, isCreator, hideShareButtons } = props
|
||||||
const { closeTime, creatorName, creatorUsername } = contract
|
const { closeTime, creatorName, creatorUsername } = contract
|
||||||
const { liquidityLabel, createdDate, resolvedDate } =
|
const { volumeLabel, createdDate, resolvedDate } = contractMetrics(contract)
|
||||||
contractMetrics(contract)
|
|
||||||
|
|
||||||
const tweetText = getTweetText(contract, !!isCreator)
|
const tweetText = getTweetText(contract, !!isCreator)
|
||||||
|
|
||||||
|
@ -232,7 +231,7 @@ export function ContractDetails(props: {
|
||||||
<Row className="items-center gap-1">
|
<Row className="items-center gap-1">
|
||||||
<DatabaseIcon className="h-5 w-5" />
|
<DatabaseIcon className="h-5 w-5" />
|
||||||
|
|
||||||
<div className="whitespace-nowrap">{liquidityLabel}</div>
|
<div className="whitespace-nowrap">{volumeLabel}</div>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
{!hideShareButtons && (
|
{!hideShareButtons && (
|
||||||
|
@ -249,8 +248,7 @@ export function ContractDetails(props: {
|
||||||
// String version of the above, to send to the OpenGraph image generator
|
// String version of the above, to send to the OpenGraph image generator
|
||||||
export function contractTextDetails(contract: Contract) {
|
export function contractTextDetails(contract: Contract) {
|
||||||
const { closeTime, tags } = contract
|
const { closeTime, tags } = contract
|
||||||
const { createdDate, resolvedDate, liquidityLabel } =
|
const { createdDate, resolvedDate, volumeLabel } = contractMetrics(contract)
|
||||||
contractMetrics(contract)
|
|
||||||
|
|
||||||
const hashtags = tags.map((tag) => `#${tag}`)
|
const hashtags = tags.map((tag) => `#${tag}`)
|
||||||
|
|
||||||
|
@ -261,7 +259,7 @@ export function contractTextDetails(contract: Contract) {
|
||||||
closeTime
|
closeTime
|
||||||
).format('MMM D, h:mma')}`
|
).format('MMM D, h:mma')}`
|
||||||
: '') +
|
: '') +
|
||||||
` • ${liquidityLabel}` +
|
` • ${volumeLabel}` +
|
||||||
(hashtags.length > 0 ? ` • ${hashtags.join(' ')}` : '')
|
(hashtags.length > 0 ? ` • ${hashtags.join(' ')}` : '')
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -417,7 +417,7 @@ export function FeedQuestion(props: {
|
||||||
const { contract, showDescription } = props
|
const { contract, showDescription } = props
|
||||||
const { creatorName, creatorUsername, question, resolution, outcomeType } =
|
const { creatorName, creatorUsername, question, resolution, outcomeType } =
|
||||||
contract
|
contract
|
||||||
const { liquidityLabel } = contractMetrics(contract)
|
const { volumeLabel } = contractMetrics(contract)
|
||||||
const isBinary = outcomeType === 'BINARY'
|
const isBinary = outcomeType === 'BINARY'
|
||||||
|
|
||||||
const closeMessage =
|
const closeMessage =
|
||||||
|
@ -445,7 +445,7 @@ export function FeedQuestion(props: {
|
||||||
asked
|
asked
|
||||||
{/* Currently hidden on mobile; ideally we'd fit this in somewhere. */}
|
{/* Currently hidden on mobile; ideally we'd fit this in somewhere. */}
|
||||||
<span className="float-right hidden text-gray-400 sm:inline">
|
<span className="float-right hidden text-gray-400 sm:inline">
|
||||||
{liquidityLabel}
|
{volumeLabel}
|
||||||
{closeMessage}
|
{closeMessage}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -39,12 +39,12 @@ export function contractMetrics(contract: Contract) {
|
||||||
? dayjs(resolutionTime).format('MMM D')
|
? dayjs(resolutionTime).format('MMM D')
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
const liquidityLabel =
|
const volumeLabel =
|
||||||
contract.mechanism === 'dpm-2'
|
contract.mechanism === 'dpm-2'
|
||||||
? `${formatMoney(truePool)} pool`
|
? `${formatMoney(truePool)} pool`
|
||||||
: `${formatMoney(contract.volume ?? contract.volume7Days)} volume`
|
: `${formatMoney(contract.volume)} volume`
|
||||||
|
|
||||||
return { truePool, liquidityLabel, createdDate, resolvedDate }
|
return { truePool, volumeLabel, createdDate, resolvedDate }
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBinaryProb(contract: FullContract<any, Binary>) {
|
export function getBinaryProb(contract: FullContract<any, Binary>) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user