import { Empty, Form } from 'antd'; import {Grid, GridItem} from '../../components/Grid' import '../../styles/index.css' const renderSwitchableColumn = (column, itm) => { if(column.render) { return ( {column.render(itm[column.dataIndex])} ) } return

{itm[column.dataIndex]}

} export const View = ({columns, item}) => { if (!item || !columns?.length) return const colsCount = 3 const viewItems = columns.map( (column, i) => { const row = Math.floor(i / colsCount) + 1 const colb = i % colsCount return <> {column.title} {renderSwitchableColumn(column, item)} }) return <> {viewItems} }