import React from 'react'; import PropTypes from 'prop-types'; import { View, Text } from 'react-native'; import FastImage from '@rocket.chat/react-native-fast-image'; import Touch from '../../utils/touch'; import Check from '../../containers/Check'; import styles, { ROW_HEIGHT } from './styles'; import { themes } from '../../constants/colors'; export { ROW_HEIGHT }; const ServerItem = React.memo(({ server, item, onPress, hasCheck, theme }) => ( {item.iconURL ? ( console.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, theme: PropTypes.string }; export default ServerItem;