import React, { PureComponent } from 'react'; import { List } from 'immutable'; import Navicon from 'containers/Navicon'; import Editable from 'components/ui/Editable'; import { isValidServerName } from 'state/servers'; import { linkify } from 'util'; export default class ChatTitle extends PureComponent { render() { const { title, tab, channel, onTitleChange, onToggleSearch, onToggleUserList, onCloseClick } = this.props; let closeTitle; if (tab.isChannel()) { closeTitle = 'Leave'; } else if (tab.name) { closeTitle = 'Close'; } else { closeTitle = 'Disconnect'; } return (