add padding to account charts

This commit is contained in:
saml33 2022-09-20 09:57:58 +10:00
parent 9c592c53b3
commit 56a24c0a8d
1 changed files with 32 additions and 27 deletions

View File

@ -324,34 +324,39 @@ const AccountPage = () => {
/>
) : null}
</>
) : chartToShow === 'account-value' ? (
<AccountChart
chartToShow="account-value"
data={performanceData}
hideChart={handleHideChart}
mangoAccount={mangoAccount!}
yKey="account_equity"
/>
) : chartToShow === 'pnl' ? (
<AccountChart
chartToShow="pnl"
data={performanceData}
hideChart={handleHideChart}
mangoAccount={mangoAccount!}
yKey="pnl"
/>
) : (
<AccountChart
chartToShow="cumulative-interest-value"
data={performanceData.map((d) => ({
interest_value:
d.borrow_interest_cumulative_usd + d.deposit_interest_cumulative_usd,
time: d.time,
}))}
hideChart={handleHideChart}
mangoAccount={mangoAccount!}
yKey="interest_value"
/>
<div className="p-6">
{chartToShow === 'account-value' ? (
<AccountChart
chartToShow="account-value"
data={performanceData}
hideChart={handleHideChart}
mangoAccount={mangoAccount!}
yKey="account_equity"
/>
) : chartToShow === 'pnl' ? (
<AccountChart
chartToShow="pnl"
data={performanceData}
hideChart={handleHideChart}
mangoAccount={mangoAccount!}
yKey="pnl"
/>
) : (
<AccountChart
chartToShow="cumulative-interest-value"
data={performanceData.map((d) => ({
interest_value:
d.borrow_interest_cumulative_usd +
d.deposit_interest_cumulative_usd,
time: d.time,
}))}
hideChart={handleHideChart}
mangoAccount={mangoAccount!}
yKey="interest_value"
/>
)}
</div>
)
}