1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

token value display tweaks

This commit is contained in:
Matthias Kretschmann 2020-08-19 00:48:26 +02:00
parent 71e56e4344
commit ff06d0c137
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ export default function Conversion({
const { eur } = data['ocean-protocol'] const { eur } = data['ocean-protocol']
const converted = eur * Number(price) const converted = eur * Number(price)
setPriceEur(`${formatCurrency(converted, 'EUR', 'en', true)}`) setPriceEur(`${formatCurrency(converted, 'EUR', undefined, true)}`)
} }
useEffect(() => { useEffect(() => {

View File

@ -27,7 +27,9 @@ export default function PriceUnit({
return ( return (
<div className={styleClasses}> <div className={styleClasses}>
{formatCurrency(Number(price), '', 'en', false, true)}{' '} {Number.isInteger(Number(price))
? price
: formatCurrency(Number(price), '', undefined, false, true)}{' '}
<span>{symbol || 'OCEAN'}</span> <span>{symbol || 'OCEAN'}</span>
{conversion && <Conversion price={price} />} {conversion && <Conversion price={price} />}
</div> </div>

View File

@ -17,7 +17,7 @@ export default function Details(): ReactElement {
{Object.entries(balance).map(([key, value]) => ( {Object.entries(balance).map(([key, value]) => (
<li className={styles.balance} key={key}> <li className={styles.balance} key={key}>
<span>{key.toUpperCase()}</span>{' '} <span>{key.toUpperCase()}</span>{' '}
{formatCurrency(value, '', 'en', true, true)} {formatCurrency(value, '', undefined, true, true)}
{key === 'ocean' && <Conversion price={value} />} {key === 'ocean' && <Conversion price={value} />}
</li> </li>
))} ))}