diff --git a/src/components/Display.jsx b/src/components/Display.jsx index 7850fda..8b0993f 100644 --- a/src/components/Display.jsx +++ b/src/components/Display.jsx @@ -25,15 +25,18 @@ export const ValueDisplay = ({prefix, value, suffix, isArrowVisible}) =>{ setVal(value) } - },[value]) + },[value, isArrowVisible, oldVal]) let arrow = null switch (arrowState){ case 1: arrow = - break; + break case -1: arrow = + break + default: + break } return({prefix} {val} {suffix}{arrow})