James suggestions

This commit is contained in:
ingawei 2022-09-26 17:07:13 -07:00
parent 67fbd024f1
commit ed3d1c76e7
3 changed files with 18 additions and 41 deletions

View File

@ -41,20 +41,15 @@ export function AmountInput(props: {
return (
<>
<Col className={className}>
<label>
<span
className={clsx(
'text-greyscale-4 absolute ml-2 mt-[9px]',
isMobile ? 'font-sm' : 'font-lg'
)}
>
<label className={clsx(isMobile ? 'font-sm' : 'font-lg')}>
<span className={clsx('text-greyscale-4 absolute ml-2 mt-[9px]')}>
{label}
</span>
<input
className={clsx(
'placeholder:text-greyscale-4 border-greyscale-2 rounded-md pl-9',
error && 'input-error',
isMobile ? 'font-sm w-24' : 'font-lg',
isMobile ? 'w-24' : '',
inputClassName
)}
ref={inputRef}

View File

@ -83,17 +83,9 @@ export function BinaryMobileBetting(props: { contract: BinaryContract }) {
const { contract } = props
const user = useUser()
if (user) {
return (
<>
<SignedInBinaryMobileBetting contract={contract} user={user} />
</>
)
return <SignedInBinaryMobileBetting contract={contract} user={user} />
} else {
return (
<>
<BetSignUpPrompt className="w-full" />
</>
)
return <BetSignUpPrompt className="w-full" />
}
}

View File

@ -182,7 +182,6 @@ export function BuyPanel(props: {
const windowSize = useWindowSize()
const initialOutcome =
windowSize.width && windowSize.width >= 1280 ? 'YES' : undefined
console.log('initialOutcome>', initialOutcome)
const [outcome, setOutcome] = useState<'YES' | 'NO' | undefined>(
initialOutcome
)
@ -304,28 +303,19 @@ export function BuyPanel(props: {
return (
<Col className={hidden ? 'hidden' : ''}>
{!mobileView && (
<>
<YesNoSelector
className="mb-4"
btnClassName="flex-1"
selected={outcome}
onSelect={(choice) => onBetChoice(choice)}
onSelect={(choice) => {
if (mobileView) {
mobileOnBetChoice(choice)
} else {
onBetChoice(choice)
}
}}
isPseudoNumeric={isPseudoNumeric}
/>
</>
)}
{mobileView && (
<>
<YesNoSelector
className="mb-4"
btnClassName="flex-1"
selected={outcome}
onSelect={(choice) => mobileOnBetChoice(choice)}
isPseudoNumeric={isPseudoNumeric}
/>
</>
)}
<Col
className={clsx(