diff --git a/web/components/feed-create.tsx b/web/components/feed-create.tsx
index 0f57a982..a2b7f245 100644
--- a/web/components/feed-create.tsx
+++ b/web/components/feed-create.tsx
@@ -1,42 +1,66 @@
import { useUser } from '../hooks/use-user'
-import { ResolutionOrChance } from './contract-card'
import { AvatarWithIcon } from './contract-feed'
import { Col } from './layout/col'
import { Title } from './title'
import Textarea from 'react-expanding-textarea'
+import { useState } from 'react'
+import { Spacer } from './layout/spacer'
+import { NewContract } from '../pages/create'
export default function FeedCreate() {
const user = useUser()
+ const [question, setQuestion] = useState('')
+
if (!user) {
+ // TODO: Improve logged-out experience
return
}
- const question = 'Ask a question...'
- const description =
- 'Resolves YES under no circumstances, but perhaps lorem ipsum will come and save the day!\nI kinda doubt it though...'
+ 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 (
-
-
+
+
- {/* Text form to type a question */}
- {/* TODO: Figure out how to get rid of border; but also show focus for accessibility */}
+ {/* TODO: Show focus, for accessibility */}
+ {/* 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 && (
+
+
+
+ )}
)
diff --git a/web/pages/create.tsx b/web/pages/create.tsx
index ac1c9c51..867a8e2f 100644
--- a/web/pages/create.tsx
+++ b/web/pages/create.tsx
@@ -5,19 +5,50 @@ import dayjs from 'dayjs'
import Textarea from 'react-expanding-textarea'
import { Spacer } from '../components/layout/spacer'
-import { Title } from '../components/title'
import { useUser } from '../hooks/use-user'
import { Contract, contractPath } from '../lib/firebase/contracts'
-import { Page } from '../components/page'
import { createContract } from '../lib/firebase/api-call'
import { Row } from '../components/layout/row'
import { AmountInput } from '../components/amount-input'
import { MINIMUM_ANTE } from '../../common/antes'
import { InfoTooltip } from '../components/info-tooltip'
import { CREATOR_FEE } from '../../common/fees'
+import { Page } from '../components/page'
+import { Title } from '../components/title'
+
+export default function Create() {
+ const [question, setQuestion] = useState('')
+
+ return (
+
+
+
+
+
+
+
+
+
+
+ )
+}
// Allow user to create a new contract
-export default function NewContract() {
+export function NewContract(props: { question: string }) {
+ const question = props.question
const creator = useUser()
useEffect(() => {
@@ -29,7 +60,6 @@ export default function NewContract() {
}, [])
const [initialProb, setInitialProb] = useState(50)
- const [question, setQuestion] = useState('')
const [description, setDescription] = useState('')
const [ante, setAnte] = useState(undefined)
@@ -82,141 +112,118 @@ export default function NewContract() {
await router.push(contractPath(result.contract as Contract))
}
- // const descriptionPlaceholder = `e.g. This market will resolve to “Yes” if, by June 2, 2021, 11:59:59 PM ET, Paxlovid (also known under PF-07321332)...`
- const descriptionPlaceholder = `Provide more detail on how you will resolve this market. (Optional)`
+ const descriptionPlaceholder = `(Optional) Describe how you will resolve this market.\ne.g. This market resolves to "YES" if, two weeks after closing, the...`
if (!creator) return <>>
return (
-
-