show sign up button on mobile on market page
This commit is contained in:
parent
06948bb98b
commit
24124ac86a
|
@ -42,7 +42,7 @@ import { useUnfilledBets } from 'web/hooks/use-bets'
|
||||||
import { LimitBets } from './limit-bets'
|
import { LimitBets } from './limit-bets'
|
||||||
import { PillButton } from './buttons/pill-button'
|
import { PillButton } from './buttons/pill-button'
|
||||||
import { YesNoSelector } from './yes-no-selector'
|
import { YesNoSelector } from './yes-no-selector'
|
||||||
import { InfoBox } from './info-box'
|
import { PlayMoneyDisclaimer } from './play-money-disclaimer'
|
||||||
|
|
||||||
export function BetPanel(props: {
|
export function BetPanel(props: {
|
||||||
contract: CPMMBinaryContract | PseudoNumericContract
|
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: {
|
export function SimpleBetPanel(props: {
|
||||||
contract: CPMMBinaryContract | PseudoNumericContract
|
contract: CPMMBinaryContract | PseudoNumericContract
|
||||||
className?: string
|
className?: string
|
||||||
|
|
|
@ -46,6 +46,7 @@ export function ContractActivity(props: {
|
||||||
items={items}
|
items={items}
|
||||||
className={className}
|
className={className}
|
||||||
betRowClassName={betRowClassName}
|
betRowClassName={betRowClassName}
|
||||||
|
user={user}
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,14 +36,18 @@ import {
|
||||||
import { FeedBet } from 'web/components/feed/feed-bets'
|
import { FeedBet } from 'web/components/feed/feed-bets'
|
||||||
import { CPMMBinaryContract, NumericContract } from 'common/contract'
|
import { CPMMBinaryContract, NumericContract } from 'common/contract'
|
||||||
import { FeedLiquidity } from './feed-liquidity'
|
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: {
|
export function FeedItems(props: {
|
||||||
contract: Contract
|
contract: Contract
|
||||||
items: ActivityItem[]
|
items: ActivityItem[]
|
||||||
className?: string
|
className?: string
|
||||||
betRowClassName?: string
|
betRowClassName?: string
|
||||||
|
user: User | null | undefined
|
||||||
}) {
|
}) {
|
||||||
const { contract, items, className, betRowClassName } = props
|
const { contract, items, className, betRowClassName, user } = props
|
||||||
const { outcomeType } = contract
|
const { outcomeType } = contract
|
||||||
|
|
||||||
const [elem, setElem] = useState<HTMLElement | null>(null)
|
const [elem, setElem] = useState<HTMLElement | null>(null)
|
||||||
|
@ -67,11 +71,20 @@ export function FeedItems(props: {
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
{outcomeType === 'BINARY' && tradingAllowed(contract) && (
|
|
||||||
|
{!user ? (
|
||||||
|
<Col className="mt-4 max-w-sm items-center xl:hidden">
|
||||||
|
<SignUpPrompt />
|
||||||
|
<PlayMoneyDisclaimer />
|
||||||
|
</Col>
|
||||||
|
) : (
|
||||||
|
outcomeType === 'BINARY' &&
|
||||||
|
tradingAllowed(contract) && (
|
||||||
<BetRow
|
<BetRow
|
||||||
contract={contract as CPMMBinaryContract}
|
contract={contract as CPMMBinaryContract}
|
||||||
className={clsx('mb-2', betRowClassName)}
|
className={clsx('mb-2', betRowClassName)}
|
||||||
/>
|
/>
|
||||||
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
9
web/components/play-money-disclaimer.tsx
Normal file
9
web/components/play-money-disclaimer.tsx
Normal 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!"
|
||||||
|
/>
|
||||||
|
)
|
Loading…
Reference in New Issue
Block a user