allow positions and trade history tables to scroll horizontally

This commit is contained in:
saml33 2023-02-09 13:01:31 +11:00
parent 1ed50b9616
commit 8fa244a09b
2 changed files with 184 additions and 182 deletions

View File

@ -72,7 +72,8 @@ const PerpPositions = () => {
)
return mangoAccountAddress && openPerpPositions.length ? (
<div>
<>
<div className="thin-scroll overflow-x-auto">
<Table>
<thead>
<TrHead>
@ -105,10 +106,8 @@ const PerpPositions = () => {
if (!basePosition) return null
const unsettledPnl = position.getUnsettledPnlUi(group, market)
const cummulativePnl = position.cumulativePnlOverPositionLifetimeUi(
group,
market
)
const cummulativePnl =
position.cumulativePnlOverPositionLifetimeUi(group, market)
return (
<TrBody key={`${position.marketIndex}`} className="my-1 p-2">
@ -180,6 +179,7 @@ const PerpPositions = () => {
})}
</tbody>
</Table>
</div>
{showMarketCloseModal && positionToClose ? (
<MarketCloseModal
isOpen={showMarketCloseModal}
@ -187,7 +187,7 @@ const PerpPositions = () => {
position={positionToClose}
/>
) : null}
</div>
</>
) : mangoAccountAddress || connected ? (
<div className="flex flex-col items-center p-8">
<NoSymbolIcon className="mb-2 h-6 w-6 text-th-fgd-4" />

View File

@ -240,6 +240,7 @@ const TradeHistory = () => {
(combinedTradeHistory.length || loadingTradeHistory) ? (
<>
{showTableView ? (
<div className="thin-scroll overflow-x-auto">
<Table>
<thead>
<TrHead>
@ -322,6 +323,7 @@ const TradeHistory = () => {
})}
</tbody>
</Table>
</div>
) : (
<div>
{combinedTradeHistory.map((trade: any, index: number) => {