|
@ -8,8 +8,8 @@ export const COLOR_VERY_GOOD = "#6F6"; |
|
|
export const COLOR_STONKS_GOOD = "#3A3"; |
|
|
export const COLOR_STONKS_GOOD = "#3A3"; |
|
|
|
|
|
|
|
|
export const colorByDiff = (diff, prevDiff, stonksDiff = 0) => { |
|
|
export const colorByDiff = (diff, prevDiff, stonksDiff = 0) => { |
|
|
if (stonksDiff > 0 && diff > 0 && diff > stonksDiff) { |
|
|
|
|
|
return COLOR_STONKS_GOOD |
|
|
|
|
|
|
|
|
if (stonksDiff > 0 && stonksDiff > prevDiff && diff > stonksDiff) { |
|
|
|
|
|
return COLOR_STONKS_GOOD; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (diff < 0) { |
|
|
if (diff < 0) { |
|
|