import PropTypes from 'prop-types'; import React, { Component } from 'react'; import Icon from 'Components/Icon'; import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRowButton from 'Components/Table/TableRowButton'; import { icons } from 'Helpers/Props'; import ProtocolLabel from 'Indexer/Index/Table/ProtocolLabel'; import firstCharToUpper from 'Utilities/String/firstCharToUpper'; import translate from 'Utilities/String/translate'; import styles from './SelectIndexerRow.css'; class SelectIndexerRow extends Component { // // Listeners onPress = () => { const { implementation, name } = this.props; this.props.onIndexerSelect({ implementation, name }); }; // // Render render() { const { protocol, privacy, name, language, description, isExistingIndexer } = this.props; return ( {name} { isExistingIndexer ? : null } {language} {description} {translate(firstCharToUpper(privacy))} ); } } SelectIndexerRow.propTypes = { name: PropTypes.string.isRequired, protocol: PropTypes.string.isRequired, privacy: PropTypes.string.isRequired, language: PropTypes.string.isRequired, description: PropTypes.string.isRequired, implementation: PropTypes.string.isRequired, onIndexerSelect: PropTypes.func.isRequired, isExistingIndexer: PropTypes.bool.isRequired }; export default SelectIndexerRow;