import {Display} from './Display' import RigMnemo from '../components/RigMnemo' export const CustomColumn = ({data}) => { const dataLast = data[data.length -1] const lines = [ {label:'Рот., об/мин', accessorName:'rotorSpeed'}, {label:'Долото, м', accessorName:'bitDepth'}, {label:'Забой, м', accessorName:'wellDepth'}, {label:'Расход, м³/ч', accessorName:'flow'}, {label:'Расход х.х., м³/ч', accessorName:'flowIdle'}, ] if(dataLast) lines.forEach(line => line.value = dataLast[line.accessorName]?.toPrecision(4)??'-' ) else lines.forEach(line => line.value = '-' ) return (<> {lines.map(line => )} ) }