Hide buy button when market has closed

This commit is contained in:
Austin Chen 2022-03-17 17:15:07 -07:00
parent e0989bdfde
commit 4c8b7bbc3d

View File

@ -711,10 +711,11 @@ function FeedAnswerGroup(props: {
{probPercent}
</span>
<BuyButton
className="btn-sm hidden flex-initial !px-6 sm:flex"
onClick={() => {
setOpen(true)
}}
className={clsx(
'btn-sm hidden flex-initial !px-6 sm:flex',
tradingAllowed(contract) ? '' : '!hidden'
)}
onClick={() => setOpen(true)}
/>
</Row>
</Row>
@ -741,12 +742,12 @@ function FeedAnswerGroup(props: {
</div>
))}
<div className="ml-10 mt-4">
<div
className={clsx('ml-10 mt-4', tradingAllowed(contract) ? '' : 'hidden')}
>
<BuyButton
className="btn-sm !px-6 sm:hidden"
onClick={() => {
setOpen(true)
}}
onClick={() => setOpen(true)}
/>
</div>
</Col>