import React from 'react'; import PropTypes from 'prop-types'; import {gettext} from 'core/utils'; import {IPropsItemListInfo} from '../ListItemInfo'; import {appConfig} from 'appConfig'; class NestedLink extends React.PureComponent { static propTypes: any; render() { const {isNested, item, toggleNested, showNested} = this.props; const sequence = item.correction_sequence || item.rewrite_sequence; if (isNested === true || appConfig.features.nestedItemsInOutputStage !== true || sequence == null || sequence <= 1) { return null; } return (
event.stopPropagation()} > {showNested ? gettext('Hide previous items') : gettext('Show previous items')}
); } } NestedLink.propTypes = { showNested: PropTypes.bool, nestedCount: PropTypes.number, toggleNested: PropTypes.func.isRequired, }; export const nestedlink = NestedLink;