import React, { memo } from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { FormattedMessage } from 'react-intl'; import pluginId from '../../pluginId'; import IconRemove from '../../assets/images/icon_remove.svg'; /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ const Relation = ({ data, mainField, onRemove, to }) => { return ( <>
{title => ( {data[mainField]} )}
Remove Icon
); }; Relation.defaultProps = { onRemove: () => {}, to: '', }; Relation.propTypes = { data: PropTypes.object.isRequired, mainField: PropTypes.string.isRequired, onRemove: PropTypes.func, to: PropTypes.string, }; export default memo(Relation);