Skip to content

Commit

Permalink
Merge pull request #875 from alexstotsky/improve-assets-section
Browse files Browse the repository at this point in the history
(improvements) Assets summary section
  • Loading branch information
ezewer authored Oct 11, 2024
2 parents fd629ab + 79c334a commit 0ffe40d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions public/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@
"sub_title": "End of day profits/losses excluding Deposits/Withdrawals"
},
"by_asset":{
"title": "Summary by Asset",
"sub_title": "For period ",
"title": "Your Assets",
"sub_title": "Summary for period ",
"currency": "Currency",
"all_assets": "All Assets",
"amount": "Amount",
Expand Down
10 changes: 6 additions & 4 deletions src/components/AppSummary/AppSummary.columns.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { Cell } from '@blueprintjs/table'

import { mapSymbol } from 'state/symbols/utils'
import { formatAmount, fixedFloat } from 'ui/utils'
import LoadingPlaceholder from 'ui/LoadingPlaceholder'
import {
Expand Down Expand Up @@ -119,12 +120,13 @@ export const getAssetColumns = ({
if (isNoData) return getCellNoData(t('column.noResults'))
const { currency } = preparedData[rowIndex]
const isTotal = getIsTotal(currency, t)
const formattedCurrency = mapSymbol(currency)
return (
<Cell tooltip={getTooltipContent(currency, t)}>
<Cell tooltip={getTooltipContent(formattedCurrency, t)}>
{isTotal ? (
<>
<span>
{currency}
{formattedCurrency}
</span>
<br />
<span className='cell-value secondary-value'>
Expand All @@ -134,14 +136,14 @@ export const getAssetColumns = ({
) : (
<>
<span className='cell-value'>
{currency}
{formattedCurrency}
</span>
</>
)}
</Cell>
)
},
copyText: rowIndex => preparedData[rowIndex]?.currency,
copyText: rowIndex => mapSymbol(preparedData[rowIndex]?.currency),
},
{
id: 'balance',
Expand Down

0 comments on commit 0ffe40d

Please sign in to comment.