import React from 'react'; import PropTypes from 'prop-types'; import { View, Text } from 'react-native'; import FastImage from 'react-native-fast-image'; import { RectButton } from 'react-native-gesture-handler'; import log from '../../utils/log'; import Check from '../../containers/Check'; import styles, { ROW_HEIGHT } from './styles'; export { ROW_HEIGHT }; const ServerItem = React.memo(({ server, item, onPress, hasCheck }) => ( {item.iconURL ? ( log('err_loading_server_icon')} /> ) : ( ) } {item.name || item.id} {item.id} {item.id === server && hasCheck ? : null} )); ServerItem.propTypes = { onPress: PropTypes.func.isRequired, item: PropTypes.object.isRequired, hasCheck: PropTypes.bool, server: PropTypes.string }; export default ServerItem;