diff --git a/functions/src/emails.ts b/functions/src/emails.ts index 7b930361..ba20df1e 100644 --- a/functions/src/emails.ts +++ b/functions/src/emails.ts @@ -86,7 +86,8 @@ Questions? Feedback? I'd love to hear from you - just reply to this email! Or come chat with us on Discord: https://discord.gg/eHQBNBqXuh Best, -Austin from Manifold` +Austin from Manifold +https://manifold.markets/` ) } diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 13f9e596..e68d4fbc 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -33,7 +33,7 @@ import { sellBet } from '../lib/firebase/api-call' import { ConfirmationButton } from './confirmation-button' import { OutcomeLabel, YesLabel, NoLabel } from './outcome-label' -type BetSort = 'newest' | 'profit' +type BetSort = 'newest' | 'profit' | 'resolved' export function BetsList(props: { user: User }) { const { user } = props @@ -111,6 +111,8 @@ export function BetsList(props: { user: User }) { (c) => c.isResolved ) + const displayedContracts = sort === 'resolved' ? resolved : unresolved + const currentInvestment = _.sumBy( unresolved, (c) => contractsInvestment[c.id] @@ -142,7 +144,7 @@ export function BetsList(props: { user: User }) {
Balance
- {formatMoney(user.balance)}{' '} + {formatMoney(Math.floor(user.balance))}{' '}
@@ -161,10 +163,11 @@ export function BetsList(props: { user: User }) { > + - {[...unresolved, ...resolved].map((contract) => ( + {displayedContracts.map((contract) => ( !question && inputRef.current?.focus()} >
@@ -99,17 +104,19 @@ export default function FeedCreate(props: { value={question} onClick={(e) => e.stopPropagation()} onChange={(e) => setQuestion(e.target.value.replace('\n', ''))} + onFocus={() => setFocused(true)} + onBlur={() => setFocused(false)} />
{/* Hide component instead of deleting, so edits to NewContract don't get lost */} -
+
{/* Show a fake "Create Market" button, which gets replaced with the NewContract one*/} - {!question && ( + {!(question || focused) && (