mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 22:25:21 +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 getColor = (balance: number) => {
|
||||||
const difference = Math.abs(balance * 100 - 50);
|
const difference = Math.abs(balance * 100);
|
||||||
|
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case difference <= 5:
|
case difference <= 5:
|
||||||
return chartColors.green;
|
return chartColors.green;
|
||||||
case difference <= 10:
|
case difference <= 10:
|
||||||
return chartColors.darkyellow;
|
return chartColors.darkyellow;
|
||||||
case difference <= 15:
|
|
||||||
return chartColors.orange;
|
|
||||||
case difference <= 20:
|
case difference <= 20:
|
||||||
|
return chartColors.orange;
|
||||||
|
case difference <= 30:
|
||||||
return chartColors.orange2;
|
return chartColors.orange2;
|
||||||
default:
|
default:
|
||||||
return chartColors.red;
|
return chartColors.red;
|
||||||
|
|
Loadingโฆ
Add table
Reference in a new issue