create: remove visilbity section
This commit is contained in:
parent
2d6fe308b8
commit
0844e5620a
|
@ -280,25 +280,27 @@ export function NewContract(props: {
|
||||||
<label className="label">
|
<label className="label">
|
||||||
<span className="mb-1">Answer type</span>
|
<span className="mb-1">Answer type</span>
|
||||||
</label>
|
</label>
|
||||||
<ChoicesToggleGroup
|
<Row>
|
||||||
currentChoice={outcomeType}
|
<ChoicesToggleGroup
|
||||||
setChoice={(choice) => {
|
currentChoice={outcomeType}
|
||||||
if (choice === 'FREE_RESPONSE')
|
setChoice={(choice) => {
|
||||||
setMarketInfoText(
|
if (choice === 'FREE_RESPONSE')
|
||||||
'Users can submit their own answers to this market.'
|
setMarketInfoText(
|
||||||
)
|
'Users can submit their own answers to this market.'
|
||||||
else setMarketInfoText('')
|
)
|
||||||
setOutcomeType(choice as outcomeType)
|
else setMarketInfoText('')
|
||||||
}}
|
setOutcomeType(choice as outcomeType)
|
||||||
choicesMap={{
|
}}
|
||||||
'Yes / No': 'BINARY',
|
choicesMap={{
|
||||||
// 'Multiple choice': 'MULTIPLE_CHOICE',
|
'Yes / No': 'BINARY',
|
||||||
'Free response': 'FREE_RESPONSE',
|
// 'Multiple choice': 'MULTIPLE_CHOICE',
|
||||||
// Numeric: 'PSEUDO_NUMERIC',
|
'Free response': 'FREE_RESPONSE',
|
||||||
}}
|
// Numeric: 'PSEUDO_NUMERIC',
|
||||||
isSubmitting={isSubmitting}
|
}}
|
||||||
className={'col-span-4'}
|
isSubmitting={isSubmitting}
|
||||||
/>
|
className={'col-span-4'}
|
||||||
|
/>
|
||||||
|
</Row>
|
||||||
{marketInfoText && (
|
{marketInfoText && (
|
||||||
<div className="mt-3 ml-1 text-sm text-indigo-700">
|
<div className="mt-3 ml-1 text-sm text-indigo-700">
|
||||||
{marketInfoText}
|
{marketInfoText}
|
||||||
|
@ -390,23 +392,7 @@ export function NewContract(props: {
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="form-control mb-1 items-start gap-1">
|
<Spacer h={4} />
|
||||||
<label className="label gap-2">
|
|
||||||
<span className="mb-1">Visibility</span>
|
|
||||||
<InfoTooltip text="Whether the market will be listed on the home page." />
|
|
||||||
</label>
|
|
||||||
<ChoicesToggleGroup
|
|
||||||
currentChoice={visibility}
|
|
||||||
setChoice={(choice) => setVisibility(choice as visibility)}
|
|
||||||
choicesMap={{
|
|
||||||
Public: 'public',
|
|
||||||
Unlisted: 'unlisted',
|
|
||||||
}}
|
|
||||||
isSubmitting={isSubmitting}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Spacer h={6} />
|
|
||||||
|
|
||||||
<Row className={'items-end gap-x-2'}>
|
<Row className={'items-end gap-x-2'}>
|
||||||
<GroupSelector
|
<GroupSelector
|
||||||
|
@ -421,6 +407,20 @@ export function NewContract(props: {
|
||||||
</SiteLink>
|
</SiteLink>
|
||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
<Row className="form-control my-2 items-center gap-2 text-sm">
|
||||||
|
<span>Display this market on homepage</span>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={visibility === 'public'}
|
||||||
|
disabled={isSubmitting}
|
||||||
|
className="cursor-pointer"
|
||||||
|
onChange={(e) =>
|
||||||
|
setVisibility(e.target.checked ? 'public' : 'unlisted')
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Spacer h={6} />
|
<Spacer h={6} />
|
||||||
|
|
||||||
<div className="form-control mb-1 items-start">
|
<div className="form-control mb-1 items-start">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user