import { AvatarWithIcon } from './contract-feed'
import { Title } from './title'
import Textarea from 'react-expanding-textarea'
import { useState } from 'react'
import { Spacer } from './layout/spacer'
import { NewContract } from '../pages/create'
import { firebaseLogin, User } from '../lib/firebase/users'
import { ContractsGrid } from './contracts-list'
import { Contract } from '../../common/contract'
import { TagsList } from './tags-list'
export function FeedPromo(props: { hotContracts: Contract[] }) {
const { hotContracts } = props
return (
<>
On Manifold Markets, you can find prediction markets run by your
favorite creators.
{' '}
and start trading!
>
)
}
export default function FeedCreate(props: { user?: User }) {
const { user } = props
const [question, setQuestion] = useState('')
const placeholders = [
'Will I make a new friend this week?',
'Will we discover that the world is a simulation?',
'Will anyone I know get engaged this year?',
'Will humans set foot on Mars by the end of 2030?',
'If I switch jobs, will I have more free time in 6 months than I do now?',
'Will any cryptocurrency eclipse Bitcoin by market cap?',
]
// Rotate through a new placeholder each day
// Easter egg idea: click your own name to shuffle the placeholder
const daysSinceEpoch = Math.floor(Date.now() / 1000 / 60 / 60 / 24)
const placeholder = placeholders[daysSinceEpoch % placeholders.length]
return (
{/* TODO: Show focus, for accessibility */}
Ask a question...
{/* 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 && (