diff --git a/web/components/choices-toggle-group.tsx b/web/components/choices-toggle-group.tsx index 0120aea9..d467cb15 100644 --- a/web/components/choices-toggle-group.tsx +++ b/web/components/choices-toggle-group.tsx @@ -20,37 +20,31 @@ export function ChoicesToggleGroup(props: { children, } = props return ( - - null} - className="mt-2" - > - - {Object.keys(choicesMap).map((choiceKey) => ( - setChoice(choicesMap[choiceKey])} - className={({ active }) => - clsx( - active ? 'ring-2 ring-indigo-500 ring-offset-2' : '', - currentChoice === choicesMap[choiceKey] - ? 'border-transparent bg-indigo-500 text-white hover:bg-indigo-600' - : 'border-gray-200 bg-white text-gray-900 hover:bg-gray-50', - 'flex cursor-pointer items-center justify-center rounded-md border py-3 px-3 text-sm font-medium normal-case', - "hover:ring-offset-2' hover:ring-2 hover:ring-indigo-500", - className - ) - } - disabled={isSubmitting} - > - {choiceKey} - - ))} - {children} - - - + null}> + + {Object.keys(choicesMap).map((choiceKey) => ( + setChoice(choicesMap[choiceKey])} + className={({ active }) => + clsx( + active ? 'ring-2 ring-indigo-500 ring-offset-2' : '', + currentChoice === choicesMap[choiceKey] + ? 'border-transparent bg-indigo-500 text-white hover:bg-indigo-600' + : 'border-gray-200 bg-white text-gray-900 hover:bg-gray-50', + 'flex cursor-pointer items-center justify-center rounded-md border py-3 px-3 text-sm font-medium normal-case', + "hover:ring-offset-2' hover:ring-2 hover:ring-indigo-500", + className + ) + } + disabled={isSubmitting} + > + {choiceKey} + + ))} + {children} + + ) } diff --git a/web/pages/create.tsx b/web/pages/create.tsx index e8d28083..78abfa10 100644 --- a/web/pages/create.tsx +++ b/web/pages/create.tsx @@ -28,7 +28,7 @@ export default function Create() { return ( - + @@ -47,6 +47,7 @@ export default function Create() { /> + @@ -168,8 +169,8 @@ export function NewContract(props: { question: string; tag?: string }) { return ( - - Answer type + + Answer type {marketInfoText && ( - + {marketInfoText} )} - + + {outcomeType === 'BINARY' && ( @@ -241,6 +243,7 @@ export function NewContract(props: { question: string; tag?: string }) { {probErrorText && ( {probErrorText} )} + )} @@ -278,27 +281,6 @@ export function NewContract(props: { question: string; tag?: string }) { )} - - - - - Description - - - e.stopPropagation()} - onChange={(e) => setDescription(e.target.value || '')} - /> - - - - Category @@ -318,11 +300,11 @@ export function NewContract(props: { question: string; tag?: string }) { - + - Question closes in: + Question closes in @@ -365,65 +347,72 @@ export function NewContract(props: { question: string; tag?: string }) { - + - Cost - {mustWaitForDailyFreeMarketStatus != 'loading' && - mustWaitForDailyFreeMarketStatus && ( - - )} + Description + - {mustWaitForDailyFreeMarketStatus != 'loading' && - !mustWaitForDailyFreeMarketStatus ? ( - - - {formatMoney(ante)} - {' '} - FREE - - ) : ( - mustWaitForDailyFreeMarketStatus != 'loading' && ( - - {formatMoney(ante)} - - ) - )} - {mustWaitForDailyFreeMarketStatus != 'loading' && - mustWaitForDailyFreeMarketStatus && - ante > balance && ( - - Insufficient balance - (window.location.href = '/add-funds')} - > - Add funds - - - )} - - {/* */} + onClick={(e) => e.stopPropagation()} + onChange={(e) => setDescription(e.target.value || '')} + /> - + + + + + + Cost + {mustWaitForDailyFreeMarketStatus != 'loading' && + mustWaitForDailyFreeMarketStatus && ( + + )} + + {mustWaitForDailyFreeMarketStatus != 'loading' && + !mustWaitForDailyFreeMarketStatus ? ( + + + {formatMoney(ante)} + {' '} + FREE + + ) : ( + mustWaitForDailyFreeMarketStatus != 'loading' && ( + + {formatMoney(ante)} + + ) + )} + {mustWaitForDailyFreeMarketStatus != 'loading' && + mustWaitForDailyFreeMarketStatus && + ante > balance && ( + + Insufficient balance + (window.location.href = '/add-funds')} + > + Add funds + + + )} + - {isSubmitting ? 'Creating...' : 'Create question'} - + ) }