fix: ๐Ÿ› rebalance dot color

This commit is contained in:
Anthony Potdevin 2020-09-12 10:53:24 +02:00
parent 7dddb9a3d2
commit ba3f47e5da
No known key found for this signature in database
GPG key ID: 4403F1DFBE779457

View file

@ -30,16 +30,16 @@ type BalanceCardProps = {
};
const getColor = (balance: number) => {
const difference = Math.abs(balance * 100 - 50);
const difference = Math.abs(balance * 100);
switch (true) {
case difference <= 5:
return chartColors.green;
case difference <= 10:
return chartColors.darkyellow;
case difference <= 15:
return chartColors.orange;
case difference <= 20:
return chartColors.orange;
case difference <= 30:
return chartColors.orange2;
default:
return chartColors.red;