Browse Source

Tidying up some stuff

master
Stian Fredrik Aune 3 years ago
parent
commit
e09eb107d3
  1. 2
      my-bois/src/components/Bois.jsx
  2. 4
      my-bois/src/helpers/color.js

2
my-bois/src/components/Bois.jsx

@ -117,7 +117,7 @@ export const CentreBoi = () => {
const stopRun = useCallback(() => {
if (state === "connected") {
stop();
setHidden(false);
setHidden(true);
return true;
}

4
my-bois/src/helpers/color.js

@ -8,8 +8,8 @@ export const COLOR_VERY_GOOD = "#6F6";
export const COLOR_STONKS_GOOD = "#3A3";
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) {

Loading…
Cancel
Save