| 1 |
import {Interweave} from 'interweave'; |
| 2 |
import './styles.scss'; |
| 3 |
|
| 4 |
//@since 2.24.0 renders all SSR data from backend |
| 5 |
const InterweaveSSR = ({column, item}) => { |
| 6 |
let value = item?.[column.id]; |
| 7 |
if (value === undefined) { |
| 8 |
value = null; |
| 9 |
} |
| 10 |
|
| 11 |
if (column.id === 'id') { |
| 12 |
return <div className={'idBadge'}>{value}</div>; |
| 13 |
} |
| 14 |
|
| 15 |
if (value === '' || value === null) { |
| 16 |
return <>'-'</>; |
| 17 |
} |
| 18 |
|
| 19 |
return <Interweave attributes={{className: 'interweave'}} content={value} />; |
| 20 |
}; |
| 21 |
export default InterweaveSSR; |
| 22 |
|