mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 14:22:33 +01:00
fix: ๐ rebalance dot color
This commit is contained in:
parent
7dddb9a3d2
commit
ba3f47e5da
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loadingโฆ
Add table
Reference in a new issue