create: remove visilbity section

This commit is contained in:
mantikoros 2022-10-01 14:30:31 -05:00
parent 2d6fe308b8
commit 0844e5620a

View File

@ -280,6 +280,7 @@ 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>
<Row>
<ChoicesToggleGroup <ChoicesToggleGroup
currentChoice={outcomeType} currentChoice={outcomeType}
setChoice={(choice) => { setChoice={(choice) => {
@ -299,6 +300,7 @@ export function NewContract(props: {
isSubmitting={isSubmitting} isSubmitting={isSubmitting}
className={'col-span-4'} 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">