James suggestions
This commit is contained in:
parent
67fbd024f1
commit
ed3d1c76e7
|
@ -41,20 +41,15 @@ export function AmountInput(props: {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Col className={className}>
|
<Col className={className}>
|
||||||
<label>
|
<label className={clsx(isMobile ? 'font-sm' : 'font-lg')}>
|
||||||
<span
|
<span className={clsx('text-greyscale-4 absolute ml-2 mt-[9px]')}>
|
||||||
className={clsx(
|
|
||||||
'text-greyscale-4 absolute ml-2 mt-[9px]',
|
|
||||||
isMobile ? 'font-sm' : 'font-lg'
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
{label}
|
{label}
|
||||||
</span>
|
</span>
|
||||||
<input
|
<input
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'placeholder:text-greyscale-4 border-greyscale-2 rounded-md pl-9',
|
'placeholder:text-greyscale-4 border-greyscale-2 rounded-md pl-9',
|
||||||
error && 'input-error',
|
error && 'input-error',
|
||||||
isMobile ? 'font-sm w-24' : 'font-lg',
|
isMobile ? 'w-24' : '',
|
||||||
inputClassName
|
inputClassName
|
||||||
)}
|
)}
|
||||||
ref={inputRef}
|
ref={inputRef}
|
||||||
|
|
|
@ -83,17 +83,9 @@ export function BinaryMobileBetting(props: { contract: BinaryContract }) {
|
||||||
const { contract } = props
|
const { contract } = props
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
if (user) {
|
if (user) {
|
||||||
return (
|
return <SignedInBinaryMobileBetting contract={contract} user={user} />
|
||||||
<>
|
|
||||||
<SignedInBinaryMobileBetting contract={contract} user={user} />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
return (
|
return <BetSignUpPrompt className="w-full" />
|
||||||
<>
|
|
||||||
<BetSignUpPrompt className="w-full" />
|
|
||||||
</>
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,6 @@ export function BuyPanel(props: {
|
||||||
const windowSize = useWindowSize()
|
const windowSize = useWindowSize()
|
||||||
const initialOutcome =
|
const initialOutcome =
|
||||||
windowSize.width && windowSize.width >= 1280 ? 'YES' : undefined
|
windowSize.width && windowSize.width >= 1280 ? 'YES' : undefined
|
||||||
console.log('initialOutcome>', initialOutcome)
|
|
||||||
const [outcome, setOutcome] = useState<'YES' | 'NO' | undefined>(
|
const [outcome, setOutcome] = useState<'YES' | 'NO' | undefined>(
|
||||||
initialOutcome
|
initialOutcome
|
||||||
)
|
)
|
||||||
|
@ -304,28 +303,19 @@ export function BuyPanel(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col className={hidden ? 'hidden' : ''}>
|
<Col className={hidden ? 'hidden' : ''}>
|
||||||
{!mobileView && (
|
<YesNoSelector
|
||||||
<>
|
className="mb-4"
|
||||||
<YesNoSelector
|
btnClassName="flex-1"
|
||||||
className="mb-4"
|
selected={outcome}
|
||||||
btnClassName="flex-1"
|
onSelect={(choice) => {
|
||||||
selected={outcome}
|
if (mobileView) {
|
||||||
onSelect={(choice) => onBetChoice(choice)}
|
mobileOnBetChoice(choice)
|
||||||
isPseudoNumeric={isPseudoNumeric}
|
} else {
|
||||||
/>
|
onBetChoice(choice)
|
||||||
</>
|
}
|
||||||
)}
|
}}
|
||||||
{mobileView && (
|
isPseudoNumeric={isPseudoNumeric}
|
||||||
<>
|
/>
|
||||||
<YesNoSelector
|
|
||||||
className="mb-4"
|
|
||||||
btnClassName="flex-1"
|
|
||||||
selected={outcome}
|
|
||||||
onSelect={(choice) => mobileOnBetChoice(choice)}
|
|
||||||
isPseudoNumeric={isPseudoNumeric}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<Col
|
<Col
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user