import { Flex, Typography, Tag, Space } from 'antd' import PropTypes from 'prop-types' const { Text } = Typography const NetGrossDisplay = ({ value, prefix = '', suffix = '' }) => { const net = parseFloat(value?.net) const gross = parseFloat(value?.gross) return ( {net != null && net !== '' ? ( prefix + net.toFixed(2).toString() + suffix ) : ( n/a )} Net {gross != null && gross !== '' ? ( prefix + gross.toFixed(2).toString() + suffix ) : ( n/a )} Gross ) } NetGrossDisplay.propTypes = { value: PropTypes.shape({ net: PropTypes.number, gross: PropTypes.number }), prefix: PropTypes.string, suffix: PropTypes.string } export default NetGrossDisplay