From 24124ac86a1528db5e97a16fa42c8aec9cf0c509 Mon Sep 17 00:00:00 2001 From: mantikoros Date: Mon, 25 Jul 2022 17:45:33 -0700 Subject: [PATCH] show sign up button on mobile on market page --- web/components/bet-panel.tsx | 10 +-------- web/components/feed/contract-activity.tsx | 1 + web/components/feed/feed-items.tsx | 25 +++++++++++++++++------ web/components/play-money-disclaimer.tsx | 9 ++++++++ 4 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 web/components/play-money-disclaimer.tsx diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 0e3bb6fd..7a9b77e4 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -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 = () => ( - -) - export function SimpleBetPanel(props: { contract: CPMMBinaryContract | PseudoNumericContract className?: string diff --git a/web/components/feed/contract-activity.tsx b/web/components/feed/contract-activity.tsx index e50eb76b..b1c8f6ee 100644 --- a/web/components/feed/contract-activity.tsx +++ b/web/components/feed/contract-activity.tsx @@ -46,6 +46,7 @@ export function ContractActivity(props: { items={items} className={className} betRowClassName={betRowClassName} + user={user} /> ) } diff --git a/web/components/feed/feed-items.tsx b/web/components/feed/feed-items.tsx index ea8302b8..b1cd765c 100644 --- a/web/components/feed/feed-items.tsx +++ b/web/components/feed/feed-items.tsx @@ -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(null) @@ -67,11 +71,20 @@ export function FeedItems(props: { ))} - {outcomeType === 'BINARY' && tradingAllowed(contract) && ( - + + {!user ? ( + + + + + ) : ( + outcomeType === 'BINARY' && + tradingAllowed(contract) && ( + + ) )} ) diff --git a/web/components/play-money-disclaimer.tsx b/web/components/play-money-disclaimer.tsx new file mode 100644 index 00000000..6ee16c1e --- /dev/null +++ b/web/components/play-money-disclaimer.tsx @@ -0,0 +1,9 @@ +import { InfoBox } from './info-box' + +export const PlayMoneyDisclaimer = () => ( + +)