forked from BLC/AyposWeb
Fix the negative at the results gained values
This commit is contained in:
@@ -144,10 +144,14 @@ const MigrationAdviceCard: React.FC<MigrationAdviceCardProps> = ({
|
|||||||
variant="h6"
|
variant="h6"
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
color: gainBeforeData.prop_gain > 0 ? '#28c76f' : '#FF1744'
|
color: gainBeforeData.prop_gain === 0
|
||||||
|
? theme.palette.text.primary
|
||||||
|
: gainBeforeData.prop_gain > 0
|
||||||
|
? '#28c76f'
|
||||||
|
: '#FF1744'
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{Math.abs(gainBeforeData.prop_gain * 100).toFixed(2)}%
|
{(gainBeforeData.prop_gain * 100).toFixed(2)}%
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -114,7 +114,11 @@ const VerifiedMigration: React.FC<VerifiedMigrationProps> = ({
|
|||||||
<Typography variant="h4" sx={{
|
<Typography variant="h4" sx={{
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
mb: 0.5,
|
mb: 0.5,
|
||||||
color: gainAfterData.actual_ratio > 0 ? '#28c76f' : '#FF1744'
|
color: gainAfterData.actual_ratio === 0
|
||||||
|
? theme.palette.text.primary
|
||||||
|
: gainAfterData.actual_ratio > 0
|
||||||
|
? '#28c76f'
|
||||||
|
: '#FF1744'
|
||||||
}}>
|
}}>
|
||||||
{(gainAfterData.actual_ratio * 100).toFixed(2)}%
|
{(gainAfterData.actual_ratio * 100).toFixed(2)}%
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
Reference in New Issue
Block a user