Remove show hot volume param

This commit is contained in:
James Grugett 2022-09-05 16:25:46 -05:00
parent 9a49c0b8fe
commit d812776357
3 changed files with 6 additions and 21 deletions

View File

@ -35,7 +35,6 @@ import { Tooltip } from '../tooltip'
export function ContractCard(props: { export function ContractCard(props: {
contract: Contract contract: Contract
showHotVolume?: boolean
showTime?: ShowTime showTime?: ShowTime
className?: string className?: string
questionClass?: string questionClass?: string
@ -45,7 +44,6 @@ export function ContractCard(props: {
trackingPostfix?: string trackingPostfix?: string
}) { }) {
const { const {
showHotVolume,
showTime, showTime,
className, className,
questionClass, questionClass,
@ -147,7 +145,6 @@ export function ContractCard(props: {
<AvatarDetails contract={contract} short={true} className="md:hidden" /> <AvatarDetails contract={contract} short={true} className="md:hidden" />
<MiscDetails <MiscDetails
contract={contract} contract={contract}
showHotVolume={showHotVolume}
showTime={showTime} showTime={showTime}
hideGroupLink={hideGroupLink} hideGroupLink={hideGroupLink}
/> />

View File

@ -2,7 +2,6 @@ import {
ClockIcon, ClockIcon,
DatabaseIcon, DatabaseIcon,
PencilIcon, PencilIcon,
TrendingUpIcon,
UserGroupIcon, UserGroupIcon,
} from '@heroicons/react/outline' } from '@heroicons/react/outline'
import clsx from 'clsx' import clsx from 'clsx'
@ -40,30 +39,19 @@ export type ShowTime = 'resolve-date' | 'close-date'
export function MiscDetails(props: { export function MiscDetails(props: {
contract: Contract contract: Contract
showHotVolume?: boolean
showTime?: ShowTime showTime?: ShowTime
hideGroupLink?: boolean hideGroupLink?: boolean
}) { }) {
const { contract, showHotVolume, showTime, hideGroupLink } = props const { contract, showTime, hideGroupLink } = props
const { const { volume, closeTime, isResolved, createdTime, resolutionTime } =
volume, contract
volume24Hours,
closeTime,
isResolved,
createdTime,
resolutionTime,
} = contract
const isNew = createdTime > Date.now() - DAY_MS && !isResolved const isNew = createdTime > Date.now() - DAY_MS && !isResolved
const groupToDisplay = getGroupLinkToDisplay(contract) const groupToDisplay = getGroupLinkToDisplay(contract)
return ( return (
<Row className="items-center gap-3 truncate text-sm text-gray-400"> <Row className="items-center gap-3 truncate text-sm text-gray-400">
{showHotVolume ? ( {showTime === 'close-date' ? (
<Row className="gap-0.5">
<TrendingUpIcon className="h-5 w-5" /> {formatMoney(volume24Hours)}
</Row>
) : showTime === 'close-date' ? (
<Row className="gap-0.5 whitespace-nowrap"> <Row className="gap-0.5 whitespace-nowrap">
<ClockIcon className="h-5 w-5" /> <ClockIcon className="h-5 w-5" />
{(closeTime || 0) < Date.now() ? 'Closed' : 'Closes'}{' '} {(closeTime || 0) < Date.now() ? 'Closed' : 'Closes'}{' '}
@ -369,7 +357,7 @@ function EditableCloseDate(props: {
return ( return (
<> <>
{isEditingCloseTime ? ( {isEditingCloseTime ? (
<Row className="z-10 mr-2 w-full shrink-0 items-start items-center gap-1"> <Row className="z-10 mr-2 w-full shrink-0 items-center gap-1">
<input <input
type="date" type="date"
className="input input-bordered shrink-0" className="input input-bordered shrink-0"

View File

@ -82,7 +82,7 @@ const Home = (props: { auth: { user: User } | null }) => {
<SearchSection <SearchSection
key={id} key={id}
label={'Your bets'} label={'Your bets'}
sort={'newest'} sort={'prob-change-day'}
user={user} user={user}
yourBets yourBets
/> />