PlayMoneyDisclaimer; hide limit orders for signed out users; infobox styling
This commit is contained in:
parent
e389f4cc3b
commit
df91310d0f
|
@ -42,6 +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'
|
||||||
|
|
||||||
export function BetPanel(props: {
|
export function BetPanel(props: {
|
||||||
contract: CPMMBinaryContract | PseudoNumericContract
|
contract: CPMMBinaryContract | PseudoNumericContract
|
||||||
|
@ -72,6 +73,7 @@ export function BetPanel(props: {
|
||||||
<QuickOrLimitBet
|
<QuickOrLimitBet
|
||||||
isLimitOrder={isLimitOrder}
|
isLimitOrder={isLimitOrder}
|
||||||
setIsLimitOrder={setIsLimitOrder}
|
setIsLimitOrder={setIsLimitOrder}
|
||||||
|
hideToggle={!user}
|
||||||
/>
|
/>
|
||||||
<BuyPanel
|
<BuyPanel
|
||||||
hidden={isLimitOrder}
|
hidden={isLimitOrder}
|
||||||
|
@ -85,7 +87,10 @@ export function BetPanel(props: {
|
||||||
user={user}
|
user={user}
|
||||||
unfilledBets={unfilledBets}
|
unfilledBets={unfilledBets}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SignUpPrompt />
|
<SignUpPrompt />
|
||||||
|
|
||||||
|
{!user && <PlayMoneyDisclaimer />}
|
||||||
</Col>
|
</Col>
|
||||||
{unfilledBets.length > 0 && (
|
{unfilledBets.length > 0 && (
|
||||||
<LimitBets className="mt-4" contract={contract} bets={unfilledBets} />
|
<LimitBets className="mt-4" contract={contract} bets={unfilledBets} />
|
||||||
|
@ -94,6 +99,14 @@ export function BetPanel(props: {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const PlayMoneyDisclaimer = () => (
|
||||||
|
<InfoBox
|
||||||
|
title="M$ are play-money"
|
||||||
|
className="mt-4 max-w-md"
|
||||||
|
text="Manifold Dollars are the play currency 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
|
||||||
|
@ -124,6 +137,7 @@ export function SimpleBetPanel(props: {
|
||||||
<QuickOrLimitBet
|
<QuickOrLimitBet
|
||||||
isLimitOrder={isLimitOrder}
|
isLimitOrder={isLimitOrder}
|
||||||
setIsLimitOrder={setIsLimitOrder}
|
setIsLimitOrder={setIsLimitOrder}
|
||||||
|
hideToggle={!user}
|
||||||
/>
|
/>
|
||||||
<BuyPanel
|
<BuyPanel
|
||||||
hidden={isLimitOrder}
|
hidden={isLimitOrder}
|
||||||
|
@ -140,7 +154,10 @@ export function SimpleBetPanel(props: {
|
||||||
unfilledBets={unfilledBets}
|
unfilledBets={unfilledBets}
|
||||||
onBuySuccess={onBetSuccess}
|
onBuySuccess={onBetSuccess}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SignUpPrompt />
|
<SignUpPrompt />
|
||||||
|
|
||||||
|
{!user && <PlayMoneyDisclaimer />}
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
{unfilledBets.length > 0 && (
|
{unfilledBets.length > 0 && (
|
||||||
|
@ -688,32 +705,35 @@ function LimitOrderPanel(props: {
|
||||||
function QuickOrLimitBet(props: {
|
function QuickOrLimitBet(props: {
|
||||||
isLimitOrder: boolean
|
isLimitOrder: boolean
|
||||||
setIsLimitOrder: (isLimitOrder: boolean) => void
|
setIsLimitOrder: (isLimitOrder: boolean) => void
|
||||||
|
hideToggle?: boolean
|
||||||
}) {
|
}) {
|
||||||
const { isLimitOrder, setIsLimitOrder } = props
|
const { isLimitOrder, setIsLimitOrder, hideToggle } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row className="align-center mb-4 justify-between">
|
<Row className="align-center mb-4 justify-between">
|
||||||
<div className="text-4xl">Bet</div>
|
<div className="text-4xl">Bet</div>
|
||||||
<Row className="mt-1 items-center gap-2">
|
{!hideToggle && (
|
||||||
<PillButton
|
<Row className="mt-1 items-center gap-2">
|
||||||
selected={!isLimitOrder}
|
<PillButton
|
||||||
onSelect={() => {
|
selected={!isLimitOrder}
|
||||||
setIsLimitOrder(false)
|
onSelect={() => {
|
||||||
track('select quick order')
|
setIsLimitOrder(false)
|
||||||
}}
|
track('select quick order')
|
||||||
>
|
}}
|
||||||
Quick
|
>
|
||||||
</PillButton>
|
Quick
|
||||||
<PillButton
|
</PillButton>
|
||||||
selected={isLimitOrder}
|
<PillButton
|
||||||
onSelect={() => {
|
selected={isLimitOrder}
|
||||||
setIsLimitOrder(true)
|
onSelect={() => {
|
||||||
track('select limit order')
|
setIsLimitOrder(true)
|
||||||
}}
|
track('select limit order')
|
||||||
>
|
}}
|
||||||
Limit
|
>
|
||||||
</PillButton>
|
Limit
|
||||||
</Row>
|
</PillButton>
|
||||||
|
</Row>
|
||||||
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ export function InfoBox(props: {
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-3">
|
<div className="ml-3">
|
||||||
<h3 className="text-sm font-medium text-black">{title}</h3>
|
<h3 className="text-sm font-medium text-black">{title}</h3>
|
||||||
<div className="mt-2 text-sm text-black">
|
<div className="mt-2 text-sm text-gray-600">
|
||||||
<Linkify text={text} />
|
<Linkify text={text} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user