import React, { memo } from 'react'; import { FiUsers, FiSearch, FiX } from 'react-icons/fi'; import Navicon from 'containers/Navicon'; import Button from 'components/ui/Button'; import Editable from 'components/ui/Editable'; import { isValidServerName } from 'state/servers'; import { isChannel } from 'utils'; const ChatTitle = ({ status, title, tab, channel, openModal, onTitleChange, onToggleSearch, onToggleUserList, onCloseClick }) => { let closeTitle; if (isChannel(tab)) { closeTitle = 'Leave'; } else if (tab.name) { closeTitle = 'Close'; } else { closeTitle = 'Disconnect'; } let serverError = null; if (!tab.name && status.error) { serverError = ( Error: {status.error} ); } return (