show sign up button on mobile on market page

This commit is contained in:
mantikoros 2022-07-25 17:45:33 -07:00
parent 06948bb98b
commit 24124ac86a
4 changed files with 30 additions and 15 deletions

View File

@ -42,7 +42,7 @@ import { useUnfilledBets } from 'web/hooks/use-bets'
import { LimitBets } from './limit-bets'
import { PillButton } from './buttons/pill-button'
import { YesNoSelector } from './yes-no-selector'
import { InfoBox } from './info-box'
import { PlayMoneyDisclaimer } from './play-money-disclaimer'
export function BetPanel(props: {
contract: CPMMBinaryContract | PseudoNumericContract
@ -100,14 +100,6 @@ export function BetPanel(props: {
)
}
const PlayMoneyDisclaimer = () => (
<InfoBox
title="Play-money betting"
className="mt-4 max-w-md"
text="Mana (M$) is the play-money used by our platform to keep track of your bets. It's completely free for you and your friends to get started!"
/>
)
export function SimpleBetPanel(props: {
contract: CPMMBinaryContract | PseudoNumericContract
className?: string

View File

@ -46,6 +46,7 @@ export function ContractActivity(props: {
items={items}
className={className}
betRowClassName={betRowClassName}
user={user}
/>
)
}

View File

@ -36,14 +36,18 @@ import {
import { FeedBet } from 'web/components/feed/feed-bets'
import { CPMMBinaryContract, NumericContract } from 'common/contract'
import { FeedLiquidity } from './feed-liquidity'
import { SignUpPrompt } from '../sign-up-prompt'
import { User } from 'common/user'
import { PlayMoneyDisclaimer } from '../play-money-disclaimer'
export function FeedItems(props: {
contract: Contract
items: ActivityItem[]
className?: string
betRowClassName?: string
user: User | null | undefined
}) {
const { contract, items, className, betRowClassName } = props
const { contract, items, className, betRowClassName, user } = props
const { outcomeType } = contract
const [elem, setElem] = useState<HTMLElement | null>(null)
@ -67,11 +71,20 @@ export function FeedItems(props: {
</div>
))}
</div>
{outcomeType === 'BINARY' && tradingAllowed(contract) && (
<BetRow
contract={contract as CPMMBinaryContract}
className={clsx('mb-2', betRowClassName)}
/>
{!user ? (
<Col className="mt-4 max-w-sm items-center xl:hidden">
<SignUpPrompt />
<PlayMoneyDisclaimer />
</Col>
) : (
outcomeType === 'BINARY' &&
tradingAllowed(contract) && (
<BetRow
contract={contract as CPMMBinaryContract}
className={clsx('mb-2', betRowClassName)}
/>
)
)}
</div>
)

View File

@ -0,0 +1,9 @@
import { InfoBox } from './info-box'
export const PlayMoneyDisclaimer = () => (
<InfoBox
title="Play-money betting"
className="mt-4 max-w-md"
text="Mana (M$) is the play-money used by our platform to keep track of your bets. It's completely free for you and your friends to get started!"
/>
)