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