order book things

This commit is contained in:
ingawei 2022-09-28 06:55:02 -07:00
parent 513cf7b290
commit b46499a583
2 changed files with 13 additions and 17 deletions

View File

@ -17,7 +17,6 @@ import { BetSignUpPrompt } from './sign-up-prompt'
import { User } from 'web/lib/firebase/users' import { User } from 'web/lib/firebase/users'
import { SellRow } from './sell-row' import { SellRow } from './sell-row'
import { useUnfilledBets } from 'web/hooks/use-bets' import { useUnfilledBets } from 'web/hooks/use-bets'
import { LimitBets, OrderBookButton } from './limit-bets'
/** Button that opens BetPanel in a new modal */ /** Button that opens BetPanel in a new modal */
export default function BetButton(props: { export default function BetButton(props: {
@ -116,11 +115,6 @@ export function SignedInBinaryMobileBetting(props: {
'border-greyscale-3 bg-greyscale-1 rounded-md border-2 px-4 py-2' 'border-greyscale-3 bg-greyscale-1 rounded-md border-2 px-4 py-2'
} }
/> />
<LimitBets
className="mt-4"
contract={contract as CPMMBinaryContract}
bets={unfilledBets}
/>
</Col> </Col>
</> </>
) )

View File

@ -415,18 +415,20 @@ export function BuyPanel(props: {
> >
Advanced Advanced
</button> </button>
<Modal <Modal open={seeLimit} setOpen={setSeeLimit} position="center">
open={seeLimit} <Col className="rounded-lg bg-white px-4 pb-4">
setOpen={setSeeLimit} <Title text="Limit Order" />
position="center" <LimitOrderPanel
className="rounded-lg bg-white px-4 pb-8" hidden={!seeLimit}
> contract={contract}
<Title text="Limit Order" /> user={user}
<LimitOrderPanel unfilledBets={unfilledBets}
hidden={!seeLimit} />
</Col>
<LimitBets
contract={contract} contract={contract}
user={user} bets={unfilledBets as LimitBet[]}
unfilledBets={unfilledBets} className="mt-2 rounded-lg bg-white px-4 pb-4"
/> />
</Modal> </Modal>
</Col> </Col>