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

space saving tweaks for asset teaser (#1742)

This commit is contained in:
Matthias Kretschmann 2022-10-13 07:42:10 +01:00 committed by GitHub
parent 68a5e9dd42
commit 83d83447b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 7 deletions

View File

@ -32,22 +32,25 @@ export function getNetworkDisplayName(
displayName = 'Polygon' displayName = 'Polygon'
break break
case 1287: case 1287:
displayName = 'Moonbase Alpha' displayName = 'Moonbase'
break break
case 1285: case 1285:
displayName = 'Moonriver' displayName = 'Moonriver'
break break
case 80001: case 80001:
displayName = 'Polygon Mumbai' displayName = 'Mumbai'
break break
case 8996: case 8996:
displayName = 'Development' displayName = 'Development'
break break
case 3: case 3:
displayName = 'ETH Ropsten' displayName = 'Ropsten'
break
case 5:
displayName = 'Görli'
break break
case 2021000: case 2021000:
displayName = 'GAIA-X Testnet' displayName = 'GAIA-X'
break break
default: default:
displayName = data displayName = data

View File

@ -51,7 +51,7 @@
font-size: var(--font-size-mini); font-size: var(--font-size-mini);
display: inline-block; display: inline-block;
border-left: 1px solid var(--border-color); border-left: 1px solid var(--border-color);
padding-left: calc(var(--spacer) / 3.5); padding-left: calc(var(--spacer) / 4);
margin-left: calc(var(--spacer) / 4); margin-left: calc(var(--spacer) / 4);
} }

View File

@ -39,7 +39,9 @@ export default function AssetTeaser({
type={type} type={type}
accessType={accessType} accessType={accessType}
/> />
<span className={styles.typeLabel}>{datatokens[0]?.symbol}</span> <span className={styles.typeLabel}>
{datatokens[0]?.symbol.substring(0, 9)}
</span>
<NetworkName <NetworkName
networkId={asset.chainId} networkId={asset.chainId}
className={styles.typeLabel} className={styles.typeLabel}

View File

@ -9,7 +9,7 @@ import styles from './index.module.css'
export function NetworkIcon({ name }: { name: string }): ReactElement { export function NetworkIcon({ name }: { name: string }): ReactElement {
const IconMapped = name.includes('ETH') const IconMapped = name.includes('ETH')
? EthIcon ? EthIcon
: name.includes('Polygon') : name.includes('Polygon') || name.includes('Mumbai')
? PolygonIcon ? PolygonIcon
: name.includes('Moon') : name.includes('Moon')
? MoonbeamIcon ? MoonbeamIcon