Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(improvements) Assets summary section #875

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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