diff --git a/web/components/add-funds-button.tsx b/web/components/add-funds-button.tsx index 5fecde73..521bc045 100644 --- a/web/components/add-funds-button.tsx +++ b/web/components/add-funds-button.tsx @@ -18,11 +18,11 @@ export function AddFundsButton(props: { className?: string }) { diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index 5037f91f..205c68b6 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -57,23 +57,22 @@ export function AmountInput(props: { onChange={(e) => onAmountChange(e.target.value)} /> - {user && ( - - {error ? ( -
- {error} + {user && + (error ? ( +
+ {error} +
+ ) : ( + +
+ Remaining balance
- ) : ( - -
Remaining balance
-
- {formatMoney(Math.floor(remainingBalance))} -
- - )} - {user.balance !== 1000 && } - - )} + +
{formatMoney(Math.floor(remainingBalance))}
+ {user.balance !== 1000 && } +
+ + ))} ) } diff --git a/web/components/contract-card.tsx b/web/components/contract-card.tsx index d902b80d..9fc08526 100644 --- a/web/components/contract-card.tsx +++ b/web/components/contract-card.tsx @@ -12,6 +12,7 @@ import { import { Col } from './layout/col' import { parseTags } from '../lib/util/parse' import dayjs from 'dayjs' +import { TrendingUpIcon } from '@heroicons/react/solid' export function ContractCard(props: { contract: Contract @@ -113,7 +114,8 @@ export function AbbrContractDetails(props: {
{showHotVolume ? (
- {formatMoney(volume24Hours)} 24h vol + {' '} + {formatMoney(volume24Hours)}
) : (
{formatMoney(truePool)} pool
diff --git a/web/components/contract-feed.tsx b/web/components/contract-feed.tsx index 7d02427f..9576b80e 100644 --- a/web/components/contract-feed.tsx +++ b/web/components/contract-feed.tsx @@ -86,6 +86,8 @@ function FeedBet(props: { activityItem: any }) { const { id, contractId, amount, outcome, createdTime } = activityItem const user = useUser() const isCreator = user?.id == activityItem.userId + // The creator can comment if the bet was posted in the last hour + const canComment = isCreator && Date.now() - createdTime < 60 * 60 * 1000 const [comment, setComment] = useState('') async function submitComment() { @@ -106,7 +108,7 @@ function FeedBet(props: { activityItem: any }) { {isCreator ? 'You' : 'A trader'} placed{' '} {formatMoney(amount)} on {' '} - {isCreator && ( + {canComment && ( // Allow user to comment in an textarea if they are the creator