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