Fix the negative at the results gained values

This commit is contained in:
2025-08-03 15:26:32 +03:00
parent 81fd909637
commit b264c6d5a4
2 changed files with 11 additions and 3 deletions

View File

@@ -144,10 +144,14 @@ const MigrationAdviceCard: React.FC<MigrationAdviceCardProps> = ({
variant="h6"
sx={{
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>
</Grid>
</Grid>

View File

@@ -114,7 +114,11 @@ const VerifiedMigration: React.FC<VerifiedMigrationProps> = ({
<Typography variant="h4" sx={{
fontWeight: 'bold',
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)}%
</Typography>