import { useState } from 'react'; import {CaretUpOutlined, CaretDownOutlined} from '@ant-design/icons' export const ValueDisplay = ({prefix, value, suffix, isArrowVisible}) =>{ const [oldVal, setOldVal] = useState(NaN) let val = '---' let arrow = null if(value) if(Number.isFinite(+value)){ val = (+value).toPrecision(4)??'---' if (isArrowVisible) { arrow = value > oldVal ? : setOldVal(value) } } else val = value return({prefix} {val} {suffix}{arrow}) } export const Display = (props)=>{ const {label} = props return
{label}
}