Remove daily balance change
This commit is contained in:
parent
6720375553
commit
405c77a6ce
|
@ -50,7 +50,7 @@ const Home = () => {
|
||||||
<EditButton />
|
<EditButton />
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<DailyProfitAndBalance userId={user?.id} />
|
<DailyProfitAndBalance className="self-end" userId={user?.id} />
|
||||||
|
|
||||||
{sections.map((item) => {
|
{sections.map((item) => {
|
||||||
const { id } = item
|
const { id } = item
|
||||||
|
@ -194,22 +194,13 @@ function DailyProfitAndBalance(props: {
|
||||||
const profit =
|
const profit =
|
||||||
calculatePortfolioProfit(last) - calculatePortfolioProfit(first)
|
calculatePortfolioProfit(last) - calculatePortfolioProfit(first)
|
||||||
|
|
||||||
const balanceChange = last.balance - first.balance
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx(className, 'text-lg')}>
|
<div className={clsx(className, 'text-lg')}>
|
||||||
<span className={clsx(profit >= 0 ? 'text-green-500' : 'text-red-500')}>
|
<span className={clsx(profit >= 0 ? 'text-green-500' : 'text-red-500')}>
|
||||||
{profit >= 0 && '+'}
|
{profit >= 0 && '+'}
|
||||||
{formatMoney(profit)}
|
{formatMoney(profit)}
|
||||||
</span>{' '}
|
</span>{' '}
|
||||||
profit and{' '}
|
profit today
|
||||||
<span
|
|
||||||
className={clsx(balanceChange >= 0 ? 'text-green-500' : 'text-red-500')}
|
|
||||||
>
|
|
||||||
{balanceChange >= 0 && '+'}
|
|
||||||
{formatMoney(balanceChange)}
|
|
||||||
</span>{' '}
|
|
||||||
balance today
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user