From 4c8b7bbc3d1ac857ab2b90b677cf6022f1754e33 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Thu, 17 Mar 2022 17:15:07 -0700 Subject: [PATCH] Hide buy button when market has closed --- web/components/feed/feed-items.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/web/components/feed/feed-items.tsx b/web/components/feed/feed-items.tsx index befb7c06..db526741 100644 --- a/web/components/feed/feed-items.tsx +++ b/web/components/feed/feed-items.tsx @@ -711,10 +711,11 @@ function FeedAnswerGroup(props: { {probPercent} { - setOpen(true) - }} + className={clsx( + 'btn-sm hidden flex-initial !px-6 sm:flex', + tradingAllowed(contract) ? '' : '!hidden' + )} + onClick={() => setOpen(true)} /> @@ -741,12 +742,12 @@ function FeedAnswerGroup(props: { ))} -
+
{ - setOpen(true) - }} + onClick={() => setOpen(true)} />