mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-15 00:23:34 +03:00
Merge pull request #2600 from ecency/nt/refine-asset-card
refined asset card ui
This commit is contained in:
commit
adb7c24472
@ -111,7 +111,7 @@
|
|||||||
},
|
},
|
||||||
"hive": {
|
"hive": {
|
||||||
"title": "HIVE",
|
"title": "HIVE",
|
||||||
"name": "Hive Token",
|
"name": "Liquid Hive",
|
||||||
"buy": "GET HIVE"
|
"buy": "GET HIVE"
|
||||||
},
|
},
|
||||||
"hbd": {
|
"hbd": {
|
||||||
@ -120,7 +120,7 @@
|
|||||||
},
|
},
|
||||||
"hive_power": {
|
"hive_power": {
|
||||||
"title": "HIVE POWER",
|
"title": "HIVE POWER",
|
||||||
"name": "Hive Power | Staked Hive"
|
"name": "Staked Hive"
|
||||||
},
|
},
|
||||||
"hive_dollar":{
|
"hive_dollar":{
|
||||||
"name":"Hive Dollar"
|
"name":"Hive Dollar"
|
||||||
|
@ -80,6 +80,8 @@ export const AssetCard = ({
|
|||||||
? intl.formatMessage({ id: `wallet.${id}.name` })
|
? intl.formatMessage({ id: `wallet.${id}.name` })
|
||||||
: name;
|
: name;
|
||||||
const value = `${ownedBalance.toFixed(isEngine ? 6 : 3)}`;
|
const value = `${ownedBalance.toFixed(isEngine ? 6 : 3)}`;
|
||||||
|
const _fiatValue = ownedBalance * currentValue;
|
||||||
|
const _fiatStr = `${_fiatValue.toFixed(_fiatValue < 1 ? 5 : 2)}${currencySymbol}`;
|
||||||
|
|
||||||
const _renderHeader = (
|
const _renderHeader = (
|
||||||
<View style={styles.cardHeader}>
|
<View style={styles.cardHeader}>
|
||||||
@ -103,7 +105,7 @@ export const AssetCard = ({
|
|||||||
{value}
|
{value}
|
||||||
</Text>
|
</Text>
|
||||||
<Text style={styles.textSubtitleRight}>
|
<Text style={styles.textSubtitleRight}>
|
||||||
{`${(ownedBalance * currentValue).toFixed(6)}${currencySymbol}`}
|
{_fiatStr}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@ -118,7 +120,7 @@ export const AssetCard = ({
|
|||||||
title={btnTitle}
|
title={btnTitle}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
isClaiming={isClaiming}
|
isClaiming={isClaiming}
|
||||||
containerStyle={id !== ASSET_IDS.ECENCY && styles.claimContainer}
|
containerStyle={{...styles.claimContainer, marginBottom: id === ASSET_IDS.ECENCY ? 0 : 16}}
|
||||||
onPress={_onClaimPress}
|
onPress={_onClaimPress}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
@ -49,7 +49,7 @@ export default EStyleSheet.create({
|
|||||||
},
|
},
|
||||||
|
|
||||||
claimContainer:{
|
claimContainer:{
|
||||||
marginBottom:16,
|
marginTop:16,
|
||||||
},
|
},
|
||||||
|
|
||||||
chartContainer: {
|
chartContainer: {
|
||||||
|
Loading…
Reference in New Issue
Block a user