From a7c8b8aec4d008997d7f14500111f96aaa6a0538 Mon Sep 17 00:00:00 2001 From: Ian Philips <iansphilips@gmail.com> Date: Thu, 1 Sep 2022 07:34:02 -0600 Subject: [PATCH] Hide bet panel when signed out --- web/components/bet-panel.tsx | 47 ++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/web/components/bet-panel.tsx b/web/components/bet-panel.tsx index 913216e9..d596dd46 100644 --- a/web/components/bet-panel.tsx +++ b/web/components/bet-panel.tsx @@ -67,27 +67,32 @@ export function BetPanel(props: { className )} > - <QuickOrLimitBet - isLimitOrder={isLimitOrder} - setIsLimitOrder={setIsLimitOrder} - hideToggle={!user} - /> - <BuyPanel - hidden={isLimitOrder} - contract={contract} - user={user} - unfilledBets={unfilledBets} - /> - <LimitOrderPanel - hidden={!isLimitOrder} - contract={contract} - user={user} - unfilledBets={unfilledBets} - /> - - <BetSignUpPrompt /> - - {!user && <PlayMoneyDisclaimer />} + {user ? ( + <> + <QuickOrLimitBet + isLimitOrder={isLimitOrder} + setIsLimitOrder={setIsLimitOrder} + hideToggle={!user} + /> + <BuyPanel + hidden={isLimitOrder} + contract={contract} + user={user} + unfilledBets={unfilledBets} + /> + <LimitOrderPanel + hidden={!isLimitOrder} + contract={contract} + user={user} + unfilledBets={unfilledBets} + /> + </> + ) : ( + <> + <BetSignUpPrompt /> + <PlayMoneyDisclaimer /> + </> + )} </Col> {user && unfilledBets.length > 0 && (